Disabling Layout Builder Library for a bundle throws FieldException Error

Created on 9 April 2024, 3 months ago

Problem/Motivation

Disabling Layout Builder Library for a content type throws a field exception (Drupal\Core\Field\FieldException). This issue occurred for me on a local Drupal 10.2.5 site using the standard profile, Layout Builder Library 8.x-1.0-beta4, and the Admin Toolbar module with no content nodes, a site with only core 10.2.5 and Layout Builder Library 8.x-1.0-beta4, and a heavily customized Drupal 10.2.5 site.

When I click the back button in my browser after getting the error page, I see the usual success message that the settings have been saved, and going to the "manage fields" page shows that the `layout_selection` field has actually been deleted. I've attached a screenshot of the error page.

Also, it seems like the error is happening because of or around line 91 of layout_library.module (the `$field->delete()` operation), but I'm not sure.

Steps to reproduce

  1. Enable layout builder for a single view mode of one content type only. Allowing custom layouts per node is optional, as the error occurs regardless.
  2. Then, enable Layout Builder Library for that view mode.
  3. Disable Layout Builder Library only, and save that view mode.
πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kwiseman

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

Comments & Activities

Production build 0.69.0 2024