Complete module splits not enabling modules

Created on 8 August 2025, 2 months ago

Problem/Motivation

Simple splits (no patching or stacking) that have modules specified for complete splits with accompanying config files, no longer recognize the modules before the validation on whether individual config files may be imported for that module from the split folder.

Drupal core v11.2+

/* from config_split.config_split.my_split , these modules are not in core.extension */
...
weight: 0
stackable: false
no_patching: true
storage: folder
folder:  profiles/custom/myprofile/config/my_split
module:
  tvi: 0
  unpublished_nodes_redirect: 0
...
> drush cim

In ConfigImporter.php line 847:
                                                                                                              
  There were errors validating the config synchronization. 
                                                         
  Configuration <em class="placeholder">tvi.global_settings</em> depends on the <em class="placeholder">
  Taxonomy Views Integrator</em> module that will not be installed after import.     

  Configuration <em class="placeholder">unpublished_nodes_redirect.unpublished_nodes_redirect.doctor</em>   
  depends on the <em class="placeholder">Unpublished Nodes Redirect</em> module that will not be installed 
  after import.        
...

If the split modules are also added to the core.extension, then the import works.

However, when I run drush cex, the modules are removed from core.extension as they are listed in config_split.config_split.my_split, but trying to import it again fails with the above error.

This is after an export.

> drush cex                                                                                                 
 [notice] The active configuration is identical to the configuration in the export directory (/var/www/html/web/profiles/custom/vh_platform/config/sync).
/var/www/html/web/profiles/custom/vh_platform/config/sync

> drush config:status    
 ---------------- ----------- 
  Name             State      
 ---------------- ----------- 
  core.extension   Different  
 ---------------- ----------- 
πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States debra-v

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

Comments & Activities

  • Issue created by @debra-v
  • πŸ‡¨πŸ‡­Switzerland bircher πŸ‡¨πŸ‡Ώ

    That sounds like a critical bug!
    After all this is the fundamental feature of this module. Given that this used to work and that Config Split hasn't changed in a while, I am tempted to think that there is a related change in Drupal core. I have run into some config validation issues with another module I am working on, but I didn't yet have time to get to the bottom of it. I have some hunches of what goes wrong though so I will look into it soon.

  • Hi, we encountered a similar problem using Drupal 10.x (10.4.x and 10.5.x) with Config Split 2.0.2. During drush cim, modules defined in the local split wouldn't be imported.

    We use a split parent :

    /* config/parent/config_split.config_split.parent.yml */
    ...
    weight: -100
    stackable: false
    no_patching: false
    storage: folder
    folder: ../config/parent
    module:
      config_split: 0
    ...
    

    In this split we define all our splits (eg local)

    /* config/parent/config_split.config_split.local.yml */
    ...
    weight: 0
    stackable: false
    no_patching: false
    storage: folder
    folder: ../config/local
    module:
      dblog: 0
    ...
    

    The issue was resolved when we changed the parent split’s weight from –100 to 0.

    We also set up a fresh Drupal 11 instance but could not reproduce the issue described by debra-v there.

    Could you please share precise reproduction steps for the issue?

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

    I was not able to reproduce this bug. could you please elaborate on how to reproduce it?

  • πŸ‡©πŸ‡ͺGermany markdc Hamburg

    I just upgraded from 1.x to 2.x and I can no longer completely split. I'm not patching or stacking. Perhaps I'm not understanding how it works in 2.x.

    For example, I want the Email Reroute module in my dev environment, but not in production. What is the right way to achieve this now?

  • πŸ‡ΊπŸ‡ΈUnited States debra-v

    I have multiple splits to handle a multisite code base, one for each site, and multiple server environments (dev, test, live. At any time, 2 splits are applied in addition to the shared configuration in config/sync. All splits have weight 0, no patching, no stacking.

    site1:
    module:
    unpublished_nodes_redirect: 0
    tvi: 0

    site2:
    module:
    unpublished_nodes_redirect: 0
    tvi: 0

    site3:
    module:
    unpublished_nodes_redirect: 0
    tvi: 0

    ddev:
    modules:
    devel: 0
    field_ui: 0
    update: 0
    views_ui: 0

    pantheon-dev:
    modules:
    devel: 0
    field_ui: 0
    update: 0
    views_ui: 0

    pantheon:
    modules:
    pantheon_advanced_page_cache: 0

    The error appears at drush cim when the config files for the modules specified in the splits are attempted for import.

  • πŸ‡ΊπŸ‡ΈUnited States debra-v

    It seems that when config_split module configs are broken out into their own split (this used to work?), the modules for other splits are not enabled as expected despite this split being active and enabled for all conditions.

    ...
    langcode: en
    status: true
    dependencies: {  }
    id: config_split
    label: 'Config Split'
    description: 'Config Split configs'
    weight: 0
    stackable: false
    no_patching: true
    storage: folder
    folder: ./profiles/custom/my_profile/config/config_split
    module:
      config_split: 0
    theme: {  }
    complete_list: {  }
    partial_list: {  }
    

    Eliminating this split, re-adding config_split to core.extension and returning all config_split configs to the general sync directory resolved the problem with the modules not being enabled for other splits.

  • Status changed to Postponed: needs info 11 days ago
Production build 0.71.5 2024