I'm using the config split documentation to exclude dev module configuration on my site.

I made a configuration split that blacklists the following modules:

  • Devel
  • Kint
  • Field UI
  • Menu UI
  • Views UI

I then edited settings.php so that this config split is active on my dev environment but not my test or prod environments:

  elseif ($_ENV['PANTHEON_ENVIRONMENT'] === 'dev') {
    // Enable dev modules.
    $config['config_split.config_split.dev']['status'] = TRUE;

In the UI (/admin/config/development/configuration/config-split), the Status of the config split on the dev env is active (overwritten).

However, when I close the database from live and run drush cim on dev, the dev modules are not installed,

I am guessing this is because config/core.extension has the dev modules disabled. However, I want them disabled in this file because if they are enabled, the modules will also be enabled on production. So what am I supposed to do to get the dev modules imported on dev?

If I log in as an administrator and change the config split to TRUE in the UI, then run drush cim, the dev modules will be enabled. However, when I run drush cim again, the dev modules will be uninstalled again, so this doesn't work, either.

The documentation says: These settings need a cache clear when overridden in settings.php and the split needs to be single imported before the config import for new values to take effect.

I did the cache clear, but I don't know how to single import the config with Drush.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.