- Issue created by @jmickela
- π¨π¦Canada jmfama
I am also encountering this using LBB 1.7 and Drupal 10.3.1.
- π¨π¦Canada jmfama
The problem is somewhat similar to the one found here: https://www.drupal.org/project/simple_menu_icons/issues/3439303 π An error occurred during the execution of the Ajax response: LoadJS Needs review
Removing `$build['#attached']['library'][] = 'layout_builder_browser/browser';` on line 224 in BrowserController.php resolves this, so we need to find a way to ensure that the css file not loaded multiple times. Given that layout_builder_browser.css only contains one css rule right now, it is probably safe to remove this line until this is resolved.
- πΊπΈUnited States jmickela SF Bay Area, California
Yeah, I spent a bunch of time debugging the AJAX request that happens when the off-canvas is opened and came to the conclusion that loading the library twice causes an error, but didn't see an easy way to test if a library had been loaded already.
- First commit to issue fork.
- Assigned to mtalt
- Merge request !24Fixes JS error that is occurring when the layout builder off-canvas is opened twice. β (Open) created by mtalt
- Issue was unassigned.
- Status changed to Needs review
5 months ago 3:00pm 19 July 2024 - πΊπΈUnited States mtalt Maryland
I was also encountering the issue with Drupal 10.3.1 and Layout Builder Browser 1.7. I've opened a MR that attaches the libraries to the layout_builder element through hook_element_info_alter(). This results in the libraries only being loaded once. I saw this method of attaching a library to layout builder in this issue π¬ Generic way to attach library to layout_builder? Closed: works as designed .
- πΊπΈUnited States jrb Raleigh-Durham Area, NC, USA
I think is actually due to a bug in BigPipe and core ajax.js. I created a separate issue here:
π BigPipe error - An error occurred during the execution of the Ajax response: LoadJS Needs reviewThat new issue includes a patch that fixes the bug.
- π¨πΏCzech Republic milos.kroulik
I can confirm that MR !24 seems to solve the issue. The core issue seems to be fixed, but I wasn't able to find a solution for Drupal 10.3.x.