Problem/Motivation

There are numerous issues with Layout Builder UI:

  1. "Move" action in Drupal layouts throws an error in the AJAX response, Because it can’t find the ThreeColumnsLayout, which is referenced in the civictheme.layouts.yml file.

    Commenting out this line https://github.com/civictheme/monorepo-drupal/blob/develop/web/themes/co... and a `drush cr` allows the layouts sidebar to render, but (I assume) the actions provided by that class are not being applied.

  2. Off canvas menu - multi-value widget is printing a stray `>`
  3. Cannot drag and drop blocks
  4. Context menu has bugs in rendering

Acceptance criteria

AC 1 - Move
Given I'm a Site Administrator
And a page is open in Layout Builder edit mode
When I use the "Move" action on a layout block or section
Then the action completes successfully
And no AJAX or JavaScript errors occur

AC 2 - Sidebar
Given I'm a Site Administrator
And the Layout Builder sidebar is visible
When layouts are listed
Then all layouts render correctly
And no layout-related errors are logged

AC 3 - Off canvas menu - multi-value widget is printing a stray `>`
Given I'm a Site Administrator
And the off-canvas editing panel is open
When a multi-value field widget is displayed
Then no stray characters are visible
And the widget renders correctly

AC 4 - Drag and drop
Given I'm a Site Administrator
And a page is in Layout Builder edit mode
When the user drags a block to a new position
Then the block can be repositioned successfully
And the new order is saved

AC 5 - Context menu rendering issues
Given I'm a Site Administrator
And a page is open in Layout Builder edit mode
When the context menu is opened on a block or section
Then the menu renders correctly
And all actions are visible

Comments

alan.cole created an issue. See original summary.

alan.cole’s picture

StatusFileSize
new354.04 KB

Images for error

alan.cole’s picture

It seems the implementation in civictheme for extending the layout defined in civictheme.layouts.yml with the src/Plugins/ThreeColumnLayout.php is not possible.

https://www.drupal.org/node/2578731#using-class-key Documentation says the class must be defined in a module, and not in the theme.

Note: You can specify a custom 'class' with layouts registered in both modules and themes, BUT the class itself MUST be in a module. Themes can't contain autoloadable class files.

This may be why it throws an error.

fionamorrison23’s picture

Version: 1.11.0 » 1.x-dev
fionamorrison23’s picture

xrayfish’s picture

Any update on this - looks like this issue crops up on a new install making the column layout unusable.

fionamorrison23’s picture

Assigned: Unassigned » cb
richardgaunt’s picture

There are numerous issues with Layout Builder UI:

  1. Off canvas menu - multi-value widget is printing a stray `>`
  2. Cannot drag and drop blocks
  3. Context menu has bugs in rendering

These should be looked at in this ticket and fixed.

fionamorrison23’s picture

Issue summary: View changes
fionamorrison23’s picture

Title: ThreeColumnsLayout does not allow moving » Layout builder issues
fionamorrison23’s picture

Issue summary: View changes
cb’s picture

StatusFileSize
new36.9 KB

I am having difficulty replicating some of the issues. Perhaps they've been addressed in later versions of LB?

1. Alan's comment (#3) - I was not able to replicate this error. I did find another error with translatable strings that stopped the move form functioning but this particular error no longer occurs. I have resolved that error.
2. The off canvas menu '>' - I can't find this at all. If it's still occurring please add some instructions to replicate.
3. The drag and drop has been resolved.
4 Context menu rendering also doesn't appear to be a problem.

Screen shot of layout form context menu.

  • cb authored 1dc06a10 on 1.x
    Issue #3529980 by alan.cole, cb, fionamorrison23, richardgaunt: Layout...
richardgaunt’s picture

Assigned: cb » danielgry
Status: Active » Needs review

  • 78f926de committed on 1.x
    Issue #3529980 by alan.cole, cb, fionamorrison23, richardgaunt: Updated...
fionamorrison23’s picture

Assigned: danielgry » Unassigned
Status: Needs review » Fixed

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.

fionamorrison23’s picture

Status: Fixed » Closed (fixed)