Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature-Request: Get current working context inside invoke event ClientConfig_ConfigChange #206

Open
sebastian-marinescu opened this issue Jun 19, 2023 · 0 comments

Comments

@sebastian-marinescu
Copy link
Contributor

Summary

When developing a plugin that listens to ClientConfig_ConfigChange, inside a multi-context-aware setup, there is no way of knowing which context just got changed/updated.

Step to reproduce

Inside a plugin try to get the settings to the currently changed context:

// This always returns `mgr`, which sort of is correct:
$contextKey = $modx->context instanceof modContext || $modx->context instanceof \MODX\Revolution\modContext ? $modx->context->get('key') : 'web';
$settings = $clientConfig->getSettings($contextKey);

Observed/Expected behavior

There is currently no way to know which context got changed. When the event is invoked, it would be beneficial to also send the context-key of the currently changed context.

Environment

ClientConfig 2.3.3-pl
MODX Revolution 2.8.5-pl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant