Don't execute in a context if it's not in babel.contextKeys?
Hello and thank you for this great Extra.
I have a multi-context setup, where the "web" context is just a redirector (to the most probable language supported) and holder for common-content.
So if visiting a content in this context, or editing a resource, I get this in the logs:
[Babel] Could not load menu for context key: "web". Try to check "babel.contextKeys" in System Settings. If this is intended, you can ignore this warning.
Could this message be deactivated (by a setting maybe)?
It's a warning only.
Yes, I know -
but why does it always show in the error-logs, when debug=0 (so only real errors should be shown)?
Here it is sending on modX::LOG_LEVEL_ERROR level: https://github.com/mikrobi/babel/blob/master/core/components/babel/elements/plugins/babel.plugin.php#L84
We could change it to modX::LOG_LEVEL_WARN.
I think that would make a lot more sense, what do you think @goldsky ?
This should be fixed with 3.2.0.