Cannot configure layout or edit content when using Layout Builder

Created on 30 October 2024, 6 months ago

Problem/Motivation

I cannot configure the layout or edit the content on a page that is using Layout Builder. No options appear when I click on any of the following links: "Add section", "Add block", "Configure Body", or "Configure" within a section. A blue wait icon does show briefly to the right of the links after clicking on it.

I believe it is a theme issue because it worked when I changed the theme to Olivero. It stopped working when I changed it back. I just upgraded to 3.9.0, but had the same results using version 3.8.1.

I'm not sure when this issue started but it was working fine for years until I just noticed it recently.

I receive the same results when:

  • The deprecated module "Layout Builder Expose All Field Blocks" is enabled or disabled
  • "Create new revision" is enabled or disabled

I also verified the following:

  • Use contextual links is checked for user permissions.
  • Under Layout options for that content type, "Use Layout Builder" is checked as well as "Allow each content item to have its layout customized"

    Steps to reproduce

    • Enable Layout Builder
    • Under Manage Display for a content type enable Layout Builder and check "Allow each content item to have its layout customized"
    • Visit a page that uses that content type and click on "Layout"
    • Click on "Add Section" or any other link
    • No dialog box or options appear

    Maybe it's something on my end or I'm missing something. I appreciate any help or looking into it.

πŸ› Bug report
Status

Active

Version

3.9

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States fkildoo Alexandria, VA

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

Comments & Activities

  • Issue created by @fkildoo
  • πŸ‡ΊπŸ‡ΈUnited States fkildoo Alexandria, VA
  • πŸ‡ΊπŸ‡ΈUnited States fkildoo Alexandria, VA

    Here is an update in case anyone is reading this. I ran into further trouble with my theme when updating Drupal to 10.4+, and after some digging, discovered that the uswds.css was overriding my sub-theme CSS, possibly related to " Asset ordering is now more strictly determined by library dependencies β†’ ", which was introduced in v10.4.0.

    I solved my issue by editing my libraries.yml file in my sub-theme to add a weight. I also gave a negative weight to the USWDS JavaScript in assets, which fixed issues with the accordion and the gov header. (My USWDS assets are under my-theme/assets.) So now my libraries.yml file looks like this:

    uswds_assets:
      version: 3.10.0
      css:
        theme:
          assets/uswds/css/uswds.css: {}
      js:
        assets/uswds/js/uswds.min.js: {weight: -1}
    
    custom:
      version: 3.10.0
      css:
        theme:
          css/my-theme.css: {preprocess: false, weight: 1}
      js:
        js/my-theme.js: {}
    

    However, adding a weight to JS is discouraged, and it is recommended to use dependencies instead. I tried taking the weight off the JS and adding the dependency on the uswds_assets library to my-theme JavaScript. However, when I did that, I got a nice, fat error: "Failed to open stream: No such file or directory in _locale_parse_js_file()". I've also thought about combining the 2 libraries into one, but not sure that will do anything. For now, I'm sticking with the weight.

Production build 0.71.5 2024