Multiple sections added instead of one

Created on 24 June 2021, over 3 years ago
Updated 22 February 2024, 9 months ago

Problem/Motivation

When trying to add a single section to a layout of a page multiple section are added instead.

Steps to reproduce

The problem occurs when using Drupal 9.2.0, bootstrap Barrio Sass dev-5.x 5841e38, bootstrap layout builder dev-2.x 58959f6 and bootstrap styles dev-1.0.x 6ed42a2.

If I add a section such as bootstrap 3 column and save it immediately then one section is created with three add block buttons as expected. I can then configure the settings such as gutters, widths, columns etc as normal and it all works.

If when I add a section I also click gutters, width or columns then each time there is a error reported in the javascript console (below) and when I click save I get multiple sections created, I think there is one section for each item I've clicked.

Uncaught 
Object { message: "\nAn AJAX HTTP error occurred.\nHTTP Result Code: 500\nDebugging information follows.\nPath: /layout_builder/configure/section/overrides/node.16/2/bootstrap_layout_builder%3Ablb_col_3?_wrapper_format=drupal_dialog.off_canvas&ajax_form=1\nStatusText: 500 Service unavailable (with message)\nResponseText: The website encountered an unexpected error. Please try again later.Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: You have requested a non-existent service "user.private_tempstore". in Drupal\\Component\\DependencyInjection\\Container->get() (line 156 of core/lib/Drupal/Component/DependencyInjection/Container.php).", name: "AjaxError", stack: "@https://example.localhost/core/misc/ajax.js?v=9.2.0:110:32\n@https://example.localhost/core/misc/ajax.js?v=9.2.0:674:3\n" }

If I use stable releases of bootstrap_layout_builder 2.0.3 and bootstrap style 1.0.3 then the problem doesn't occur.

If I use the dev release of bootstrap_layout_builder dev-2.x 58959f6 and bootstrap style 1.0.3 then clicking on the add section button gives the following error and I can't add a section at all.

Uncaught 
Object { message: "\nAn AJAX HTTP error occurred.\nHTTP Result Code: 200\nDebugging information follows.\nPath: /layout_builder/choose/section/overrides/node.16/1\nStatusText: OK\nResponseText: \nFatal error:  Trait 'Drupal\\bootstrap_styles\\ResponsiveTrait' not found in /var/www/reevesweb/web/public/modules/contrib/bootstrap_layout_builder/src/Plugin/Layout/BootstrapLayout.php on line 28", name: "AjaxError", stack: "@https://example.localhost/core/misc/ajax.js?v=9.2.0:110:32\n@https://example.localhost/core/misc/ajax.js?v=9.2.0:674:3\n" }

I've attached an image to show what is added when I choose add section and select Bootstrap 3 cols, Edge to Edge, No Gutters, 33%33%33%, 33%33%33%, 100%.

Are others seeing the same problem?

πŸ› Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom Ollie222

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany guido_s Cologne

    I'm facing the error in version 2.1.1 too.
    As long as I haven't selected any column layout for the breakpoints, I just get an error message but it seems in the background the section is created anyways. You just can't see it yet on the page. And everytime you try to add the new section, you create another one in the background until I select some column layouts. Then the page updates and you see all the unintentionally created sections at once.

  • πŸ‡ΊπŸ‡ΈUnited States MichaelLHenson

    I am having the same issue. In my experience not only does it create multiple, if you stay on the creation menu and continue to randomly click the mobile,tablet, and desktop options you can potentially remove all the extra or turn on and off sections randomly. There doesn't seem to be a time limit or amount of times you can click those options and they change something. Additionally, I noticed if you attempt to create a new section but don't touch anything for 5-10 seconds before selecting the mobile,tablet, and desktop options you won't create any extra sections. It's an interesting one.

Production build 0.71.5 2024