modmore / ClientConfig

ClientConfig is a MODX Revolution Extra to allow clients to maintain settings in a user friendly way.
https://docs.modmore.com/en/Open_Source/ClientConfig/index.html
MIT License
28 stars 27 forks source link

Plugin needs namespaced classes for MODX 3 #195

Closed muzzwood closed 2 years ago

muzzwood commented 2 years ago

Reported here: https://community.modx.com/t/clientconfig-by-modmore-multi-context-issue/5496/15

Plugin is currently type-checking for MODX 2 classes. Needs to switch to namespaced version for v3.

To cater for both, should be something along the lines of:

$contextKey = $modx->context instanceof modContext || $modx->context instanceof \MODX\Revolution\modContext 
                ? $modx->context->get('key') : 'web';
muzzwood commented 2 years ago

Fixed in https://github.com/modmore/ClientConfig/commit/5ac6ad3d453a6ada123a5fa1103e9af48f52a8db