Score:0

How to prevent changing specific module installed status during config syncs?

ng flag

I know there are methods for preventing specific configurations from being exported but how do you prevent specific module's installed/un-installed status from being exported?

For example, I'd like dev,stage_file_proxy to be enabled on dev but not prod. And the reverse for mem_cache.

Also, is there a way to prevent the performance page settings (CSS, JS aggregation) from being exported?

sonfd avatar
in flag
Have you tried the [Config split](https://www.drupal.org/project/config_split) module?
Score:3
fr flag

You can use$settings['config_exclude_modules'] key in settings.php to exclude modules.

For example Refer example.settings.php

quantumized avatar
ng flag
Thank you! Do you know how I can prevent the performance (aggregation) settings from exporting?
sonfd avatar
in flag
In a world where you sync a database from live to dev or local, this method is not really going to work very well. For example, it won't enable your dev modules or disable your live modules after syncing a database.
miststudent2011 avatar
fr flag
Yes, like this https://git.drupalcode.org/project/drupal/-/blob/9.4.x/sites/example.settings.local.php#L52
sonfd avatar
in flag
That doesn't prevent the settings from being exported - it only overrides the values on the environment with that settings.php file.
miststudent2011 avatar
fr flag
Yes, you are correct. @sonfd.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.