Problem/Motivation

While working on recipes reverting using a new checkpoint storage that listened to config CRUD events I discovered that when we delete simple configuration with the config importer we don't set the initial values correctly. This is very similar to #3396197: Config saved during import does not have correct initial values set

Steps to reproduce

Proposed resolution

  • Fix \Drupal\Core\Config\ConfigImporter::importConfig() to call ->initWithData() with the old data in the correct place
  • Add test coverage

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/a

Issue fork drupal-3405798

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review

luenemann changed the visibility of the branch 3405798-config-deleted-during to hidden.

luenemann changed the visibility of the branch 3405798-config-deleted-during to active.

alexpott’s picture

The test only change has failed as expected - https://git.drupalcode.org/project/drupal/-/pipelines/58557

bircher’s picture

Status: Needs review » Reviewed & tested by the community

yes, that is totally reasonable. Amazing that nobody has found this until now.

I have reviewed it and have no complaints about the code change.

borisson_’s picture

I agree with @bircher, looks great, rtbc++

  • catch committed 2c313d68 on 10.2.x
    Issue #3405798 by alexpott, bircher: Config deleted during import does...

  • catch committed cf5e2c17 on 11.x
    Issue #3405798 by alexpott, bircher: Config deleted during import does...

  • catch committed 8ef50c83 on 10.1.x
    Issue #3405798 by alexpott, bircher: Config deleted during import does...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 10.2.x and 10.1.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.