With layout builder (core experimental module) and Bootstrap theme enabled, drag & drop and contextual links don't work on layout pages. Contextual links and drag & drop do work with Bartik theme.

Steps to reproduce:
1. Install Drupal 8.5.6
2. Enable Layout Builder module
3. Edit the basic page content type and enable “Allow each content item to have its layout customized.” - /admin/structure/types/manage/page/display
4. Add a basic page
5. Go to the layout tab on that page
6. Add the “Powered by Drupal” block
7. The “Powered by Drupal” block is draggable and it’s contextual link is available
8. Install bootstrap 8.x-3.12 theme and set it as default.
9. Go back to the layout tab on your basic page
10. The “Powered by Drupal” block is NOT draggable and it’s contextual link is not available
11. Set Bartik as the default theme again
12. Go back to the layout tab on your basic page
13. The “Powered by Drupal” block is draggable and it’s contextual link is available

Comments

kmbremner created an issue. See original summary.

akalata’s picture

There are certainly issues, but in general contextual links and the drag-and-drop are working as of core 8.7.x and Bootstrap commit fa37b6d8101.

In particular, the "Powered by Drupal" block element does have an issue. Here is the full list:

  • Core: Primary admin actions
  • Core: Tabs
  • System: Messages
  • System: Powered by Drupal
  • System: Site branding

None of these elements have a containing section/div, which is likely required for drag-and-drop to identify the element; the template may also not be printing the variable that renders the contextual links (which you would also need a wrapping element on to use effectively).

akalata’s picture

Version: 8.x-3.12 » 8.x-3.x-dev
Status: Active » Needs review
StatusFileSize
new0 bytes
markhalliwell’s picture

Version: 8.x-3.x-dev » 8.x-4.x-dev

Like core, we fix HEAD first. In this case, it's now 8.x-4.x.

Also, looks like patch is empty.

bhumikavarshney’s picture

Status: Needs review » Needs work

Hi,
@akalata The above patch is empty.
Please check.

matija5’s picture

Status: Needs work » Needs review
StatusFileSize
new392 bytes

Bartik for ex. uses core/themes/bartik/templates/block.html.twig template for Powered by Drupal block. {{ content }} inside this template is wrapped with divs.

Bootstrap uses themes/contrib/bootstrap/templates/block/block--system.html.twig but it extends block--bare.html.twig where {{content}} is not wrapped by other elements. If I extend it with block.html.twig then Powered by Drupal contextual links and drag&drop are working.

Same goes for Tabs, and probably others.

I'm attaching a patch for TESTING purposes where I created new twig template for powered by block and extended it with block.html.twig.

asmita26’s picture

Assigned: Unassigned » asmita26
asmita26’s picture

Assigned: asmita26 » Unassigned
Lokender Singh2’s picture

StatusFileSize
new18.09 KB
new12.53 KB

Thanks all for working on this, I have tested the Patch at #6 and it is working as expected. This is RTBC+1.

joseph.olstad’s picture

I'm observing something similar on a wxt_bootstrap theme that is a subtheme of bootstrap.

joseph.olstad’s picture

to be more specific I was observing issues using bootstrap 3.x

Hopefully this helps:
https://www.drupal.org/project/bootstrap_layout_builder

shelane’s picture

Status: Needs review » Closed (won't fix)

This theme will not be supported for Bootstrap 4. See alternative themes for this support.

joseph.olstad’s picture

Version: 8.x-4.x-dev » 8.x-3.x-dev
Component: User interface » Documentation
Category: Bug report » Support request
Status: Closed (won't fix) » Active

This issue also applies to bootstrap 3.x

A workaround is to use this module
https://www.drupal.org/project/layout_builder_admin_theme

To select a theme other than bootstrap to manage your layout_builder . With that said, I'm interested to learn about a better solution.

hatuhay’s picture

Status: Active » Closed (won't fix)
joseph.olstad’s picture

Status: Closed (won't fix) » Closed (works as designed)

I believe this was fixed upstream. Please open a new issue if you notice this again.