Config Split 1.x cannot be installed if Config Ignore is installed

Created on 2 June 2025, 5 months ago

Problem/Motivation

If Config Ignore is installed, you cannot subsequently install Config Split 1.x. When you attempt to, you get the following fatal error:

The "config_split" entity type does not exist.

This is because of a particularly fun chain of events:

  1. Before installing the config split entity type, the module installer calls \Drupal::service('router.route_provider')
  2. The route provider depends on the cache_tags.invalidator service
  3. Instantiation of the cache tags invalidator requires instantiating all individual cache tag invalidators, including the config_ignore.event_subscriber service
  4. The config ignore event subscriber requires the config.storage.sync service
  5. With Config Filter and Config Split 1.x that is the filtered storage so this fetches all config filter definitions
  6. Fetching the config filter definitions ends up calling SplitFilterDeriver::create()
  7. SplitFilterDeriver::create() calls $container->get('entity_type.manager')->getStorage('config_split')
  8. πŸ’₯

Steps to reproduce

drush si -y
drush en -y config_ignore
drush en -y config_split # with config_split 1.x

Proposed resolution

?

Remaining tasks

User interface changes

-

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany tstoeckler Essen, Germany

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

Comments & Activities

  • Issue created by @tstoeckler
  • πŸ‡©πŸ‡ͺGermany tstoeckler Essen, Germany

    I guess I should point out that Config Filter 1.x is required for this bug to occur. Did not check specifically why.

  • πŸ‡ΊπŸ‡ΈUnited States mikemadison Seattle, WA

    I hit this today. Updating to config split 2 and config filter 2 did seem to alleviate the issue (although I'm not sure that's a "real" work around for myself or others). I need to do a lot more testing to see if my project will work with the 2.x versions of these modules.

  • πŸ‡¨πŸ‡­Switzerland bircher πŸ‡¨πŸ‡Ώ

    Thank you for reporting this issue.
    I think the easiest way forward is to use config split 2. and config ignore 3.x and uninstall config filter.

  • πŸ‡©πŸ‡ͺGermany tstoeckler Essen, Germany

    That's fair enough. I had all modules installed locally via Git and not via Composer, so I'm not sure off the top of my head if it's even possible to get to this state with a valid composer.json. If not, I guess we can just close this. If so, maybe some conflict should be added to the composer.json?

  • πŸ‡¨πŸ‡­Switzerland bircher πŸ‡¨πŸ‡Ώ

    Ok, Well I guess this issue is for config ignore 2.x anyway which is no longer supported.. so we don't even have to add any conflict .

Production build 0.71.5 2024