Unable to install site properly with config_ignored settings

Created on 21 October 2024, 25 days ago

Problem/Motivation

With some config values being config_ignored, it's not possible to get to the same site via drush si --existing-config.

Steps to reproduce

  1. drush si minimal
  2. drush cex
  3. drush en config_ignore automated_cron
  4. visit /admin/config/development/configuration/ignore
  5. in "Configuration entity names to ignore", add automated_cron.settings:interval, but leave "Mode of operation" as Simple, then click "Save configuration"
  6. drush cex – automated_cron.settings.yml gets created without interval: 10800 (which is the default setting for this config value per web/core/modules/automated_cron/config/install/automated_cron.settings.yml)
  7. visit /admin/config/system/cron, change "Run cron every" to "1 hour" and click "Save configuration"
  8. drush cex – which reports "The active configuration is identical to the configuration in the export directory", which is… not 100% correct (as the active configuration does have that internal: 3600, but it's config_ignored), yet it's still not the main problem
  9. drush si --existing-config

Expected result: visiting /admin/config/system/cron telling the active setting as "3 hours" – because it's the module's default setting, and this setting is missing from the exported config as it's config_ignored.

Actual result: visiting /admin/config/system/cron telling the active setting as "Never" – because that's the first available option in that dropdown.

Versions: drupal/config_ignore:3.3.0 with drupal/core:10.3.6.

Proposed resolution

For ignored config values, use the module-provided defaults (where it's possible – and I know it's not even possible for some cases, eg. allowed_values for list_string fields).

Alternatively, provide extensive documentation on how to configure config_ignore with Intermediate or Advanced mode of operation: when to use which, how and why.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.3

Component

Code

Created by

🇭🇺Hungary boobaa

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

Comments & Activities

Production build 0.71.5 2024