Problem/Motivation
In version 5.1.5 a line of code 397 was changed from $variables['content']['#attributes']['block'] = $variables['attributes']['block'];
to $variables['content']['#attributes']['id'] = $variables['attributes']['id'];
due to this change the code in function bootstrap_barrio_theme_suggestions_menu_alter() does not work and further menu suggestions based on block presentation is not available any more.
Steps to reproduce
Add main menu to any two regions in block placements, both have menu--menu.html.twig suggestion, so it limits developer to theme same menu differently if displayed twice on page in different regions.
Proposed resolution
after line of code 397, add following code $variables['content']['#attributes']['block'] = $variables['attributes']['block'];
This will fix the issue and the menu suggestions will be extended to menus placed as blocks in different regions.
Comment | File | Size | Author |
---|---|---|---|
#3 | 3238496-fix-suggestions-menu-alter.patch | 679 bytes | Qandeel |
Comments
Comment #2
Qandeel CreditAttribution: Qandeel commentedHere is the patch
Comment #3
Qandeel CreditAttribution: Qandeel commentedHere is an updated patch
Comment #4
hatuhay CreditAttribution: hatuhay commentedComment #6
hatuhay CreditAttribution: hatuhay commentedFixed on 5.5.x reopened fot 5.1.5
Comment #8
hatuhay CreditAttribution: hatuhay commented