Closed (works as designed)
Project:
Config Ignore
Version:
8.x-2.1
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Oct 2017 at 08:26 UTC
Updated:
26 Sep 2018 at 12:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
grayle commentedIt 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.
Comment #4
grayle commentedJesus Lord, I need some sleep. Disregard that patch, config_filter is what needs patching not config_ignore. Oy.
Comment #5
grayle commentedConfig 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.