How to maintain a configuration change after Joomla update?

by glenatron   Last Updated September 09, 2019 10:10 AM

My component hooks into some core Joomla behaviour, adding an extra path that it needs other related components to be able to use. I do this simply by adding it to the global path include ( defines.php ) on install and removing it on uninstall.

This works well, although I accept that it may be bad policy. I need this path to be available globally and the current approach achieves that.

The problem is that if Joomla updates there is potential for my path to be erased if the update overwrites that file. I have seen this happen and it obviously makes a mess of my other components.

Having the path available is far tidier and more readable than using a component path globally, especially as some of the code that requires it may not be part of a component at all, so I would prefer to keep it this way. What I am looking for is a way to maintain this configuration across updates.

Is there a way to either keep the configured path somewhere that it will always be available but Joomla will not remove it on update or is there some kind of signal or event when a Joomla update has completed so I can hook into that in order to check the path and re-add it if necessary after the update?



Related Questions



Joomla auto update

Updated August 19, 2018 21:10 PM

Joomla auto update for commercial component

Updated August 21, 2018 09:10 AM

Where to save extension configuration?

Updated February 16, 2017 14:10 PM

Make a checkbox group disappear

Updated March 21, 2017 23:10 PM