Ignoring values in config is not working

Created on 10 September 2024, 3 months ago

Problem/Motivation

Not sure if it's something I'm missing in the documentation or if it's actually a bug..

But I have exported a configuration with an empty ignored_config_entities setting. After that I wanted to ignore a value in a config file with the ':' pattern syntax.
Doing a new config export, the value is still in the exported config.

Steps to reproduce

Do an export without ignoring patterns, so you get a clean export.
Edit the ignore config settings and add a pattern to ignore a specific value (example ignore all '_core' settings using the pattern '*:_core').
Do the export again.
The '_core' keys are still present in the configs.

Proposed resolution

There is a specific piece of code that deals with ignoring the keys. The one for the 'create' operation correctly unsets the key from the $transformation array. However since we already have done an export, we are falling into the 'update' operation. There the value is just reassigned.

ConfigIgnoreEventSubscriber:318:

if ($match === TRUE) {
  $transformation[$key] = $destination[$key];
  continue;
}

If we actually unset the value, it works (but maybe there was a reason for the assign statement ??? )

if ($match === TRUE) {
  unset($transformation[$key]);
  continue;
}

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇧🇪Belgium kriboogh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024