Problem/Motivation
Drupal Core can display an indication for Config overrides if the configuration form uses the #config_target property available from Drupal 10.2, see #3373502: #config_target in ConfigFormBase: using validation constraints for editing simple config and #2408549: Display status message on configuration forms when there are overridden values
Steps to reproduce
Add an override to your settings.php, for example;
$config['stage_file_proxy.settings']['origin'] = 'foo';
Go to /admin/config/system/stage_file_proxy and note that the field is not considered overridden.
Proposed resolution
Add a '#config_target' to each field for an indication of overridden configuration.
| Comment | File | Size | Author |
|---|
Issue fork stage_file_proxy-3232791
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3232791-use-config-target
changes, plain diff MR !76
Comments
Comment #2
rik wijnen commentedI created a patch to solve the issue.
Comment #3
rik wijnen commentedComment #4
rik wijnen commentedSolution added.
Comment #5
avpadernoComment #6
gregglesI tried to find documentation on this in core and could not find it. Is this only a contrib that takes advantage of this information? If so I'm somewhat reluctant to add it.
Comment #7
smustgrave commentedBased on comment above. Also can't find documentation for this.
Comment #8
gregglesPlease reopen if you can point to an explanation of this idea. Thanks.
Comment #9
rik wijnen commentedIt's not well documented in Drupal (it took me a while to find anything about this) and I saw that `#config` was changed to `#config_data_store` in the newer Drupal versions.
In this issue of Drupal core they are talking about the fact that Drupal should indicate if a config value was overridden. So, for newer Drupal in the future, it would be recommended to add `#config_data_store`. Please see https://www.drupal.org/project/drupal/issues/2408549
Comment #10
rik wijnen commentedComment #11
smustgrave commentedSeems like it will be postponed on #2408549: Display status message on configuration forms when there are overridden values
Comment #12
smustgrave commentedComment #13
idebr commented#2408549: Display status message on configuration forms when there are overridden values was committed in Drupal Core, so this issue is no longer postponed.
Comment #14
idebr commentedUpdated the issue summary.
Comment #16
idebr commentedComment #17
smustgrave commentedMR appears to have issues
Comment #18
idebr commentedThe pipeline is currently broken, but the MR is fine. I filed a separate issue at #3461472: Widen dependency options for next major testing
Comment #19
idebr commented#config_target is supported from Drupal Core 10.2 and later, see https://www.drupal.org/node/3373502
Comment #20
smustgrave commentedWill have think of something here. Can't just add a version restriction out of the blue on people
Comment #21
smustgrave commentedDidn't mean to change status
Comment #22
idebr commentedCheck https://www.drupal.org/project/scheduled_transitions for a project that runs different branches with different version requirements.
The 3.0.x is not yet documented on the project page, so I'm not sure what the occasion was to open a new major branch?
Comment #23
smustgrave commentedSo #2408549: Display status message on configuration forms when there are overridden values only made it into 10.4 if was going to make a new branch feel may need to target that.
Comment #25
smustgrave commentedComment #27
smustgrave commented