?
avatar PhilETaylor
PhilETaylor
19 Jun 2016

Steps to reproduce the issue

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

Expected result

When saving Joomla Global Config I expect onExtensionBeforeSave/onExtensionAfterSave to be triggered before and after configuration.php is written

Actual result

No triggers are fired

System information (as much as possible)

Joomla 3.6.0beta2 and below.

avatar PhilETaylor PhilETaylor - open - 19 Jun 2016
avatar PhilETaylor PhilETaylor - change - 19 Jun 2016
The description was changed
avatar brianteeman brianteeman - change - 19 Jun 2016
Labels Added: ?
avatar laoneo
laoneo - comment - 21 Jun 2016

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.

avatar brianteeman brianteeman - change - 27 Jun 2016
Category Components
avatar PhilETaylor
PhilETaylor - comment - 12 Jul 2016

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.

avatar mbabker
mbabker - comment - 12 Jul 2016

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.

avatar brianteeman
brianteeman - comment - 3 Aug 2016

Is there any code coming?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10867.

avatar PhilETaylor
PhilETaylor - comment - 3 Aug 2016

No code forthcoming due to other commitments, this is just highlighting another area of inconsistent api use in Joomla :(

avatar PhilETaylor PhilETaylor - change - 3 Aug 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-08-03 18:49:44
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 3 Aug 2016
avatar cyberguroo
cyberguroo - comment - 6 Jun 2018

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.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Jun 2018

@cyberguroo can you please open a new Issue as Comments on closed Issues didn't get much Notice, thanks.

Add a Comment

Login with GitHub to post a comment