When updating default layout for content type, update all contents

Created on 11 May 2023, over 1 year ago
Updated 2 February 2024, 11 months ago

Problem/Motivation

Currently, when a change is made to the default layout for a content type, there might be nodes with overrides that won't load the default layout. So it requires manually editing the contents to update the layout. This could be ok if there aren't many contents, but it's a problem if there are too many contents to edit.

Steps to reproduce

- Enable layout builder on a content type
- Override the layout for some contents
- Go to admin/structure/types/manage/content_type/display/default/layout, and make some changes.
- You will have to edit the contents manually to update the layout

Proposed resolution

- Add an option to update the layout for all contents of a content type OR
- Add documentation in the readme file with an example on how to do it in a hook_update

✨ Feature request
Status

Closed: won't fix

Version

11.0 πŸ”₯

Component
Layout builderΒ  β†’

Last updated 4 days ago

Created by

πŸ‡ͺπŸ‡ΈSpain guardiola86

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

Comments & Activities

  • Issue created by @guardiola86
  • πŸ‡¬πŸ‡§United Kingdom catch

    The overrides are there for a reason, we can't just change them when the default changes.

    Do you mean an option to reset all layouts to the default? I could possibly see that being added as a bulk action.

    Updating all the contents to include the same change as was made to the default, but keeping the overrides otherwise, is not really an option - we have no idea if the same change can be safely made.

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

    +1 for the thoughts @catch outlined. I don't think we can do this in a safe manner. Especially when there is a lot of content and a large editorial team.

    Potentially this is something that could go into a contrib module, but I don't think it should be in core.

  • Status changed to Closed: won't fix 11 months ago
  • πŸ‡³πŸ‡ΏNew Zealand danielveza Brisbane, AU

    No further updates or requests for this in 8 months. This would be very difficult to implement safely for the reasons outlined in #3. This could be built as part of contrib.

Production build 0.71.5 2024