babel icon indicating copy to clipboard operation
babel copied to clipboard

Don't execute in a context if it's not in babel.contextKeys?

Open sebastian-marinescu opened this issue 6 years ago • 4 comments

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)?

sebastian-marinescu avatar Jan 25 '19 03:01 sebastian-marinescu

It's a warning only.

goldsky avatar Feb 05 '19 10:02 goldsky

Yes, I know - but why does it always show in the error-logs, when debug=0 (so only real errors should be shown)?

sebastian-marinescu avatar Feb 05 '19 14:02 sebastian-marinescu

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.

zaigham avatar Jul 16 '20 05:07 zaigham

I think that would make a lot more sense, what do you think @goldsky ?

sebastian-marinescu avatar Jul 16 '20 16:07 sebastian-marinescu

This should be fixed with 3.2.0.

Jako avatar Mar 27 '24 14:03 Jako