-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.9, 4.4
-
MOODLE_401_STABLE, MOODLE_404_STABLE
When you click "Save" on a settings page with a forced config setting, certain setting types are treating the value as empty and are saving the corresponding value to the DB. I haven't managed to compile a full list because the handling of each type is different and not all are affected, but checkboxes are one of the main examples where the input will be considered "0" and saved regardless of the forced config setting and default.
In most cases this won't cause any immediate issues since the forced config value will still take priority, but it can expose other issues like MDL-81119 and will likely cause confusion if the forced config is removed in the future.
From some quick testing I think this may have been caused by MDL-67650 marking the fields as disabled, but there could also be other related issues.
Steps to reproduce:
- Go to Site administration > Courses > Backups > Automated backup setup.
- Make sure "Include activities and resources" (backup | backup_auto_activities) is enabled.
- In config.php, add this line to force the backup_auto_activities setting as enabled:
$CFG->forced_plugin_settings['backup']['backup_auto_activities'] = '1'; - Reload the automated backup setup page and confirm that backup_auto_activities is enabled and listed as defined in config.php
- Click save.
- Remove the forced config that was added to config.php
- Reload the page and you will notice that the setting is now disabled.
The changes will be listed in the config log. I've used backup_auto_activities as an example, but this includes many other settings and affects both config and plugin config.
- has a non-specific relationship to
-
MDL-67650 Forced $CFG config checkbox, select, textarea are not disabled in GUI
- Closed