Gateway Manager Fatal error

Fatal error: Uncaught Error: Call to a member function get() on null in /this/is/a/path/modplugin/15.include.cache.php:41

// get the context from the setupped domain
$domContext = $domain->getOne('Context');
$domContextKey = $domContext->get('key');
$sameContext = ($currContextKey == $domContextKey) ? true : false;

Having an error the context is coming back a null
have 14 different contexts

Github issue I made in parallel:

MODx Version 2.8.1
all plugins up to date

Maybe you can check in the file /this/is/a/path/modplugin/15.include.cache.php in the cache which line of code actually is on line 41. (From the source code it is not quite clear).

If the line is $domContextKey = $domContext->get('key');, then check in your database table modx_gateways that all the fields context reference an existing context.

Hi @arch1m3d35,
Thanks for this notice!
I’ll check this and fix.

2 Likes