#5607 - Allow configuration options set to their defaults to dynamically change when the default changes
| Identifier | #5607 |
|---|---|
| Issue type | Feature request or suggestion |
| Title | Allow configuration options set to their defaults to dynamically change when the default changes |
| Status | Open |
| Tags |
Roadmap: Over the horizon (custom) |
| Handling member | Deleted |
| Addon | core_configuration |
| Description | Currently, the configuration system will read in the default value if not set and fill it in the form field. Then, when the form is saved, that value is explicitly set for the configuration option.
This is not ideal for some fields, especially those whose default value is based on a language string. Instead, if a config option is saved and its value matches that of the default, it should be saved as some implicit value indicating it was marked as default. And when reading in config values, those whose value matches this magic default will instead load in the value of get_default(). This will allow config options to change according to new default values when defaults change in Composr if the config option was set to the default. For example, if a language string was edited, its respective config option would use that new text if it were set to default. |
| Steps to reproduce | |
| Additional information | From Chris:
It would need doing carefully. IIRC We have a field c_set, so you could set c_set=0 if it is just the same as the default. The actual value would still be copied in to the table as cached. You'd then need a new function that clears out cached values (values where c_set=0). You'd call that when lang files are edited. |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
We should also consider if we want this behaviour in the first place for non-lang-string config options.