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.

Command icon 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:

Comments

Rik Wijnen created an issue. See original summary.

rik wijnen’s picture

I created a patch to solve the issue.

rik wijnen’s picture

StatusFileSize
new2.78 KB
rik wijnen’s picture

Solution added.

avpaderno’s picture

Title: Missing config hinting » Add missing config hinting
Version: 8.x-1.1 » 8.x-1.x-dev
Category: Feature request » Task
Status: Active » Needs review
greggles’s picture

I 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.

smustgrave’s picture

Status: Needs review » Postponed (maintainer needs more info)

Based on comment above. Also can't find documentation for this.

greggles’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Please reopen if you can point to an explanation of this idea. Thanks.

rik wijnen’s picture

It'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

rik wijnen’s picture

Status: Closed (won't fix) » Needs review
smustgrave’s picture

Status: Needs review » Postponed
smustgrave’s picture

Version: 8.x-1.x-dev » 3.0.x-dev
idebr’s picture

Title: Add missing config hinting » Use #config_target in the settings form for an indication of overridden configuration
Status: Postponed » Active

#2408549: Display status message on configuration forms when there are overridden values was committed in Drupal Core, so this issue is no longer postponed.

idebr’s picture

Issue summary: View changes

Updated the issue summary.

idebr’s picture

Status: Active » Needs review
smustgrave’s picture

MR appears to have issues

idebr’s picture

The pipeline is currently broken, but the MR is fine. I filed a separate issue at #3461472: Widen dependency options for next major testing

idebr’s picture

#config_target is supported from Drupal Core 10.2 and later, see https://www.drupal.org/node/3373502

smustgrave’s picture

Status: Needs review » Needs work

Will have think of something here. Can't just add a version restriction out of the blue on people

smustgrave’s picture

Status: Needs work » Needs review

Didn't mean to change status

idebr’s picture

Check 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?

smustgrave’s picture

So #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.

  • smustgrave committed 687d844f on 3.1.x
    Issue #3232791 by idebr, Rik Wijnen, smustgrave, greggles, avpaderno:...
smustgrave’s picture

Version: 3.0.x-dev » 3.1.x-dev
Status: Needs review » Fixed

smustgrave’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.