Needs work
Project:
Layout Builder Modal
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 May 2021 at 22:43 UTC
Updated:
27 Sep 2025 at 04:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
mglamanComment #4
johnwebdev commentedHey, thanks for the feature request. I just tested the patch and it works!
I'm not entirely sure about it though. I think we might need to make this one configurable if we should commit it.
If you by accident click on the wrong block you try to add, you can just close the modal and select the right one in (the still opened) off canvas, where as with this, you need to click the Add block again and then select the correct block.
Comment #5
ebremner commentedSupplied is a patch that makes all the modals configurable.
Comment #6
gaurav-mathur commentedComment #7
gaurav-mathur commentedHi i just tested the patch #5 and it works.
Comment #8
gaurav-mathur commentedComment #9
imalabyaInline block selection still opens in the tray instead of the modal.
Comment #10
sakthi_dev commentedAddressed issue mentioned by @imalabya. Please review.
Comment #12
sakthi_dev commentedAs the search in Choose block not working, added JS. Please review.
Comment #13
digitalfrontiersmediaIf for any reason one of the checkbox options is not chosen and the configuration form is saved that way, $route_names is no longer defined and you get complete page failures in Layout and the Layout Builder Modal configuration page--preventing you from being able to fix it. Thus, once done, this breaks LB on your site and requires some sort of configuration import or uninstallation of the module to reset.
Offering just a minor change to sakthi_dev's patch in #12 above that incorporates a failsafe variable initialization for $route_names to prevent this from possibly happening:
Comment #15
digitalfrontiersmediaThis patch same as #13 but incorporates the codesniffer fixes.
Comment #16
mortona2k commentedManage Attributes for Layout Builder Sections Config module isn't accounted for.
Comment #17
joelseguinI've tried the latest version of the patch (#15) against Drupal 11.2.4. Everything is working nicely, no errors in console nor in the Drupal events log.
I too was surprised this wasn't part of the module's original scope and initially thought I had missed a config option. Adding the patch definitely helps with consistency and tightens up the whole user experience quite a bit. Happy to test further if needed and looking forward to getting the patch merged.