Clear pending changes on config import

Created on 21 September 2022, over 2 years ago
Updated 17 March 2024, 9 months ago

Problem/Motivation

When we import the drupal configuration, if there are changes in the layout builder form, it is not displayed correctly.

Steps to reproduce

  1. Create a simplytest.
  2. Enable modules: config, layout_builder and layout_discovery.
  3. Enable the "Use Layout Builder" option (admin/structure/types/manage/page/display).
  4. Make a change, for example, add the title block and save (admin/structure/types/manage/page/display/default/layout).
  5. Export configuration (admin/config/development/configuration/full/export).
  6. Make a change, e.g. delete title block and save (admin/structure/types/manage/page/display/default/layout).
  7. Enter the layout builder editing form and do not click on the "save layout" or "discard changes" buttons admin/structure/types/manage/page/display/default/layout).
  8. Import configuration and reload the layout administration page (admin/structure/types/manage/page/display/default/layout). The imported configuration is not displayed correctly..
πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
Layout builderΒ  β†’

Last updated 4 days ago

Created by

πŸ‡ͺπŸ‡ΈSpain javier_rey

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡ΏNew Zealand danielveza Brisbane, AU

    I wonder if we could add a ConfigEvents::IMPORT EventSubscriber and use ConfigImporterEvent::getChangelist to find any displays that are going to be updated, and clear the tempstore for just those displays.

    I guess we need to consider if deleting the tempstore on import is considered data loss or not. If it's something that we don't want to implement in core I'm pretty sure this would be a pretty easy contrib module to make.

Production build 0.71.5 2024