Setup Config Ignore and Config Split
The best practice for managing Site Studio configuration is to use Config Ignore and Config Split to remove Site Studio configuration from Drupal core configuration export and import process. See below for a brief explanation about the these terms.
Terminology
Config Filter
Contrib module that provides base functionality for hooking into Drupal configuration import and export processes
Config Ignore
Contrib module built using Config Filter. Its main purpose is to ignore specific configuration during the configuration import process.
Config Split
Contrib module built using Config Filter. Its main purpose is to set up a specific configuration to be split up from the rest of the configuration export. Split configuration can be handled in multiple ways:
- Placed in a separate configuration collection, but still exported with the configuration export process
- Placed in its own directory, but still exported with the configuration export
- Placed in database - export process will leave configuration in the database and will not create any files in the filesystem that are deemed to be part of the “split off configuration”
Setup guide
Here are the steps to configure the Config Ignore and Config Split modules to remove Site Studio configuration from the Drupal configuration export and import process:
- Download and enable Config Filter (config_filter), Config Split (config_split) and Config Ignore (config_ignore) contrib modules.
- Enable Site Studio Sync (cohesion_sync).
- Configure Config Ignore to ignore Site Studio configuration during Drupal configuration imports by adding the following Configuration names (/admin/config/development/configuration/ignore):
cohesion_*
cohesion.*
- Add new configuration split to Config Split module (/admin/config/development/configuration/config-split). Name of the config split can be anything, but we recommend something self-explanatory like “Site Studio” (site_studio)
- Configure your newly added configuration split to separate Site Studio configuration from the rest of Drupal configuration during exports by adding the following settings:
- “Storage” should be selected to “database”. This will ensure configuration exports are not recreating Site Studio configuration in the filesystem, which should lead to much more manageable version control workflows and work reviews.
- “Status” should be set to “Active”.
- In the “Complete Split” section leave all of the checkboxes empty, but add the following lines into “Additional Configuration”:
cohesion_*
cohesion.* - Leave the “Partial Split” section with default settings - no options should be selected and the “Additional Configuration” text box should be empty
- Leave the “Advanced” section with default settings - “Stackable” option should be left unchecked
- Save your configuration split settings.