Problem/Motivation

Testing a fresh install with WxT 5.4.x , noticing Layout Builder glitch out.

Steps to reproduce layout_builder issue.

Clean install of WxT 5.4.x latest.

Attempt to add a block to any layout_builder layout, it will crash, js exception.

Same test with WxT 6.1.x no issues

Steps to reproduce

Install WxT 5.4.x

Proposed resolution

THE FIX:
WxT 5.4.x layout_builder_restrictions needs to be upgraded from ^2.0 to ^3.0

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

Comments

joseph.olstad created an issue. See original summary.

joseph.olstad’s picture

Suspecting that this bug is related to layout_builder_st 1.0.x

We're using layout_builder_st 2.0.x with WxT 6.1.x

would be good to confirm this suspicion.

joseph.olstad’s picture

Ok, the bug is thrown from layout_builder_restrictions

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.

Path: /en/layout_builder/choose/block/layout_library/node_landing_page_full_default/1/main

StatusText: error
ResponseText: The website encountered an unexpected error. Try again later.Error: Call to a member function getThirdPartySetting() on null in Drupal\layout_builder_restrictions\Plugin\LayoutBuilderRestriction\EntityViewModeRestriction->inlineBlocksAllowedinContext() (line 279 of modules/contrib/layout_builder_restrictions/src/Plugin/LayoutBuilderRestriction/EntityViewModeRestriction.php).
joseph.olstad’s picture

Ok so to fix the bug with WxT 5.4.x layout_builder_restrictions needs to be upgraded from ^2.0 to ^3.0

joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

joseph.olstad’s picture

Assigned: joseph.olstad » smulvih2
Status: Active » Needs review
joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

Title: Layout Builder works correctly with WxT 6.1.x but not with WxT 5.4.x » Layout Builder Restrictions must be upgraded from 2.0.x to 3.0.x for WxT 5.4.x or else js exception
joseph.olstad’s picture

Title: Layout Builder Restrictions must be upgraded from 2.0.x to 3.0.x for WxT 5.4.x or else js exception » Fix js exception on layout - Layout Builder Restrictions must be upgraded from 2.0.x to 3.0.x
smulvih2’s picture

StatusFileSize
new595.67 KB

I was able to reproduce this error by editing a layout in the Layout Library page - /admin/structure/layouts

Editing a layout and trying to add a block produces the error below. I can confirm that upgrading to layout_builder_restrictions to 3.0.4 fixes the issue.

WxT layout builder restriction error

  • smulvih2 committed 3282f957 on 5.4.x
    Issue #3562515 by joseph.olstad: Fix js exception on layout - Layout...
smulvih2’s picture

Status: Needs review » Fixed

This has been confirmed fixed and pushed to 5.4.x

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.