I read about that if config_translation is enabled, the module will also ignore translations of a configuration, if same name is provided for the config. I tested it it's not working. I have, for example, smtp module with it's smtp.settings.yml ignored, but the file language/de/smtp.settings.yml is not ignored. Because of that, I cannot even change the settings for DE because config will appear as locked.

Comments

mariusdiacu created an issue. See original summary.

grayle’s picture

Status: Active » Needs review
StatusFileSize
new1.37 KB

It does actually work, assuming the translated configuration has something in it. If it doesn't, and it's present in the database as just an empty array, it will keep showing up as changed. That's because StorageComparer does a strict comparison between the two, but CachedStorage (used in the target) will return FALSE for empty results, while CachedStorage (used in source) which wraps FilteredStorage will return the correct empty array, as is found in the database.

This is because the target storage wraps itself before wrapping DatabaseStorage. I wrote it all out here: https://www.drupal.org/project/drupal/issues/3002457

To me this seems a problem with core, but I'll upload a patch here as well as in the other ticket to see which fix breaks the least amount of stuff. The fix here is to apply array_filter to the result before returning it in readMultiple. This mimics the behavior from CachedStorage->readMultiple and means both will be "wrong", but at least empty config items will match each other.

Status: Needs review » Needs work

The last submitted patch, 2: config_ignore.translations-ignore.2917586-2.patch, failed testing. View results

grayle’s picture

Jesus Lord, I need some sleep. Disregard that patch, config_filter is what needs patching not config_ignore. Oy.

grayle’s picture

Config Filter issue: https://www.drupal.org/project/config_filter/issues/3002488

Core issue: https://www.drupal.org/project/drupal/issues/3002457

If one of these, but not both, gets in, it should also work with empty config.

But Config Ignore itself is doing what it's supposed to be doing.