Layout Builder cannot be uninstalled while overrides exist; no easy way to revert all overrides

Created on 18 June 2018, about 6 years ago
Updated 23 June 2024, 5 days ago

Problem/Motivation

The uninstall box for Layout Builder is grayed out with the message

The Layout Section field type is used in the following field: node.layout_builder__layout

The "Manage Fields" page shows the Layout field as locked.
The "Manage Display" page says

You must revert all customized layouts of this display before you can disable this option.

Without individually checking each node, there is no way to determine which must be reverted

Proposed resolution

  1. A "Revert layout overrides" button (see Remaining Task for notes regarding button styling) on Manage Display that works for only that single bundle. This will appear in the "Layout options" fieldset.
  2. This button is only visible if the layout has overrides
  3. When this button is visible, the "Use Layout Builder" and "Allow each content item to have its layout customized." fields are disabled and hidden.
  4. The hidden fields will be replaced with the following language: "Layout Builder is enabled for this view mode, and some content items have their layouts customized. Before Layout Builder can be disabled, you must revert these overrides."
  5. This button will first take the user to a confirmation form, to confirm they're OK with all overrides being deleted.
  6. After confirming, Layout Builder will be disabled for that display and all overrides in that bundle will be removed from the database (including revisions) and remove all tempstore data for overrides in that bundle

Remaining tasks

  1. - reviewed 9/2/22)
  2. - tests are written
  3. Determine if the Manage Display page should use the #button_type' => 'danger', or a normal button style. See comment #102 πŸ› Layout Builder cannot be uninstalled while overrides exist; no easy way to revert all overrides Needs work for a summary of the current discussion.
  4. Code updates based on UX review in #94 πŸ› Layout Builder cannot be uninstalled while overrides exist; no easy way to revert all overrides Needs work .
  5. - updated 12/30/22

User interface changes

The Manage Display UI will be slightly different here is it before patch:

And after:

And the confirmation screen.

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
Layout builderΒ  β†’

Last updated about 3 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States bloomt

Live updates comments and jobs are added and updated live.
  • Blocks-Layouts

    Blocks and Layouts Initiative. See the #2811175 Add layouts to Drupal issue.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.69.0 2024