Closed (works as designed)
Project:
Barrio Bootstrap 5 Theme
Version:
5.5.4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Nov 2021 at 23:34 UTC
Updated:
13 Jun 2022 at 20:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ElToundriko commentedHello,
Same issue here with bootstrap_barrio 5.5.4 on Drupal 9.2.9.
Steps to reproduce:
Result:
the UL bubbles are visible. (see attachment)
Code inside mymodule.links.menu.yml :
Comment #3
hatuhay commentedThe new menu at least should have same structure/markup as the original main menu
Comment #4
ElToundriko commentedThanks to your advice, it now works ! I noticed from twig debug mode that the template loaded was menu.html.twig.
Here is what I've done :
Thank you @hatuhay , hope it helps the reporter of the bug.
Comment #5
hatuhay commentedThis is not a bug, please do not recategorize this.
Comment #6
potassiumchloride commentedThanks @hatuhay and @ELToundriko.
I followed these steps
And now my new subtheme does have a mymenu and top level items display the dropdown carrot. That is excellent.
However, the mymenu had the same problem as Issue 3223479 where the dropdown did not work. I was baffled because I copied the twig file (as outlined in #1 above) from Barrio 5.5.4, and I'm using the main menu in the site's default subtheme and that main menu works properly there.
Investigation showed that if the Load Library settings at /admin/appearance/settings/newsubtheme are set to any CDN or other library other than -None- then the dropdown menu for mymenu does not work in that new subtheme. This is not true for the main menu, which is displayed in the default subtheme that uses a Bootswatch library. If I set the Load Library to -None- in this new subtheme, then the custom mymenu dropdowns work.
Any ideas as to why loading a library in the new subtheme would prevent the mymenu from working, when using a library in the default subtheme with the main menu does work?
Comment #7
potassiumchloride commentedUpdate: The libraries in the /subtheme folder in the barrio module are not the same version of Bootstrap as the libraries in the bootstrap_barrio.libraries.yml file. Changing the Bootstrap version to be the same in both bootstrap_barrio.libraries.yml and bootstrap_barrio_SUBTHEME.libraries.yml worked and the drop-down menu works with a CDN.