Feature No Code Attached Yet
avatar artur-stepien
artur-stepien
15 Jul 2023

Only extensions having the config section in its manifest have default configuration set in extensions table upon install process. Components have their configuration set in params column after first configuration saving by the user. This causes some issues with third party components that are build to use build-in features like versioning or workflows and enable those features by default. For example if you set the save_history setting to be enabled by default in config.xml, until your user saves the settings him-self it will not be respected in some parts of core layouts.

Steps to reproduce the issue

  • Install a Joomla! 4 extension like Weblinks

Expected result

  • In #__extensions record of com_weblinks the params column should have the default component parameters set upon installation

Actual result

  • In #__extensions record of com_weblinks the params is always {} after installation what requires from the user to save the configuration.

System information (as much as possible)

Joomla! 4.3.3 at least but I'm pretty sure it is the issue from version 3 too.

Additional comments

Developers can load and save the settings in installer script but I don't think we should force them to do so. The default value from config.xml should be respected by default. That way we don't have to even set the default retrieval value from component parameters as the default value would be set in one place, the config.xml file.

Here is the list where for example save_history setting is assumed to be disabled:
https://github.com/search?q=repo%3Ajoomla%2Fjoomla-cms+%27save_history%27&type=code

Loading the component settings by installer would open the possibility to lighten the core views as well as the views of third party components while providing everyone with a centralized default settings (in config.xml) and still be able to set the default value returned from Registry.

avatar artur-stepien artur-stepien - open - 15 Jul 2023
avatar joomla-cms-bot joomla-cms-bot - change - 15 Jul 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Jul 2023
avatar richard67 richard67 - change - 15 Jul 2023
Labels Added: Feature
avatar richard67 richard67 - labeled - 15 Jul 2023

Add a Comment

Login with GitHub to post a comment