Save the global Config - check which triggers are called, note that the onExtensionBeforeSave/onExtensionAfterSave triggers are not fired, whereas if you are saving the configuration of any "component" with com_config then those triggers are fired.
This therefore is inconsistent and should be changed.
see here for the current triggers:
https://github.com/joomla/joomla-cms/search?utf8=%E2%9C%93&q=onExtensionBeforeSave
When saving Joomla Global Config I expect onExtensionBeforeSave/onExtensionAfterSave to be triggered before and after configuration.php is written
No triggers are fired
Joomla 3.6.0beta2 and below.
Labels |
Added:
?
|
Category | ⇒ | Components |
com_config is "just another extension" and its data should be treated in the same way as other extensions and should be firing the correct triggers.
I actually kind of agree here about the event name. Since we decided to go with context aware event names (onContent*Save
, onExtension*Save
, onUser*Save
), contextually the global configuration should have a separate event. True, the firing context is within com_config and it's "just another extension", but IMO it'd be better to assign the context based on the data being manipulated (in this case the global configuration, not something from an extension) versus the firing context.
Then again, I think it'd be better if we just had generic BeforeSave
and AfterSave
events and used additional arguments (like the context parameter we pass around) to specify what data is being saved instead of trying to contextify the event names AND provide a context parameter.
Is there any code coming?
No code forthcoming due to other commitments, this is just highlighting another area of inconsistent api use in Joomla :(
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-08-03 18:49:44 |
Closed_By | ⇒ | PhilETaylor |
Guyz we need to get this working, specially since configuration.php
is overwritten every time someone saves the config. For some special use case I needed to manually update the config.
@cyberguroo can you please open a new Issue as Comments on closed Issues didn't get much Notice, thanks.
I would not reuse the onExtensionBeforeSave/onExtensionAfterSave events as they are only used when extensions are saved as your search query is showing it. I agree that it would make sense to trigger some events, but with a different name. The parameters would be different as well, because when the global configuration is saved, different actions are performed, like saving the permissions, filters and the configuration.php file.