Layout builder - contextual links

Created on 18 March 2025, 18 days ago

Problem/Motivation

After inserting EBT block via layout builder, contextual buttons for edit/delete.. missing.

Steps to reproduce

Install some EBT modules:
https://www.drupal.org/project/ebt_core β†’
https://www.drupal.org/project/ebt_basic_button β†’

Proposed resolution

Change code resposible for hiding everything in block that isn't contextual link related.

/* $element.children(':not([data-contextual-id])').hide(0); */

// update:
const contextual_lookup = $element.children().find('[data-contextual-id]');
const has_child_contain_contextual = !!(contextual_lookup.length);
if (has_child_contain_contextual == true) {
contextual_lookup.siblings().hide();
contextual_lookup.parent().siblings().hide();
} else {
$element.children(':not([data-contextual-id])').hide(0);
}

πŸ› Bug report
Status

Active

Version

11.1 πŸ”₯

Component

layout_builder.module

Created by

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

Comments & Activities

Production build 0.71.5 2024