Re-installing after un-installing config_overlay is not possible due to "config_overlay.deleted" being present in active config

Created on 12 February 2024, 9 months ago
Updated 13 March 2024, 8 months ago

Problem/Motivation

I happened to uninstall config_overlay in a project and then changed my mind and decided to enable it again.
For some reason "config_overlay" didn't like it, and refused to install. I would like to reconcile with config_overlay.

Steps to reproduce

1. Install config_overlay as usual and export configurations
2. Uninstall config_overlay
3. Try to Install config_overlay and you are met with an error that you can't install config_overlay due to config_overlay.deleted already present in the active configuration.

NOTE: It is possible to use a heavy handed approach and do drush config-delete config_overlay.deleted and carry on with life.

Proposed resolution

- Check if buying flowers and chocolates helps, Drupal may not like it though.

Remaining tasks

TODO

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇩🇪Germany D34dMan Hamburg

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

Comments & Activities

  • Issue created by @D34dMan
  • 🇩🇪Germany tstoeckler Essen, Germany

    Thanks for opening this issue!

    To be perfectly honest, I was pretty confident that this was something with your particular setup, but I went ahead and tried to reproduce this and turns out it is absolutely reproducible. I am quite surprised, I guess I never re-installed the module before.

    I guess somehow we mess with the config incorrectly so that when uninstalling the module, the config_overlay.deleted config is not properly deleted. Really strange, but definitely a critical bug. Will try to find some time to investigate this further.

    For now, just attaching a file with my bash output for reproducing this. You can see that after uninstalling the module that the config_overlay.deleted.yml file gets exported and then the re-install fails.

  • Status changed to Needs review 9 months ago
  • 🇩🇪Germany tstoeckler Essen, Germany

    So what happens is that when the module is uninstalled, config_overlay.deleted gets correctly deleted, but then Config Overlay's config subscriber detects that as a configuration deletion and adds config_overlay.deleted to the list of deleted configuration in config_overlay.deleted, in effect recreating the configuration.

    This can be fixed, by simply ignoring this particular case in the config subscriber. Will push a branch with a fix and a test.

    I noticed, though, that there is a similar problem in that Config Overlay adds the configuration names of other modules that are deleted to config_overlay.deleted as well. Will open an issue for that.

  • @tstoeckler opened merge request.
    • f9944e6d committed on 2.x
      Issue #3420759 by tstoeckler, D34dMan: Fix re-installing Config Overlay
      
  • Status changed to Fixed 9 months ago
  • 🇩🇪Germany tstoeckler Essen, Germany

    Thanks again!

    Opened 🐛 Config of uninstalled modules gets recorded in config_overlay.deleted Active for the other issue. Will backport this one here to 1.x over there, since it's closely related.

    Thus, marking this one as fixed.

  • 🇩🇪Germany tstoeckler Essen, Germany
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024