no dropdown menue

Created on 28 February 2023, almost 2 years ago
Updated 9 March 2023, almost 2 years ago

Hi,
I changed from a Radix subtheme to a bootstrap 4 subtheme,

But after changing the theme I am not able to open my dropdown menues anymore.

Could you give me a hint what has gone wrong. I need a solution form a productive site.

Thanks in advance!!

πŸ’¬ Support request
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria inst

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

Comments & Activities

  • Issue created by @inst
  • Status changed to Postponed: needs info almost 2 years ago
  • πŸ‡¦πŸ‡ΊAustralia VladimirAus Brisbane, Australia

    Sound like you have issue with JavaScript.

    Can we have more information about

    • Versions you use
    • Your browser
    • You browser console output and if you see any errors

    One common issue might be loading bootstrap twice: once from theme and once from somewhere else: library or module.

  • πŸ‡¦πŸ‡ΉAustria inst

    Hi,
    thanks for gettinΒ΄ back to me here.

    • so I using the version Bootstrap4 3.0.1
    • the misbehaviour occurs in all roles incl. guests
    • the problem is not ependent on the browsers I use: firefox 110.0 (64bt) or chrome 110.0.5481.100 864bit)
    • the problem is online and on my local docker install
    • on all other sites I made, the bootstrap subtheme does not make these problems after having updated the base theme on 3.0.1

    thx

  • πŸ‡¦πŸ‡ΉAustria inst

    Hi,
    well I could solve one problem.
    When I click on parent the submenue opens. I gave parent as link one of the child links.
    As this was not like this before, dropdown did not work at all.

    parent
    ---child1
    ---child2
    ---child3

    Well, now after click on parent the complete submenue stays open.
    Even if I I move the mouse cursor away.

  • πŸ‡¦πŸ‡ΉAustria kevin.pfeifer

    2 Problems were present here:

    1) The bootstrap theme only adds the data-toggle="dropdown" to the menu ID main due to the fact, that this only happens in themes/contrib/bootstrap4/templates/navigation/menu--main.htm.twig. But we had another menu ID so I copied that file to our child theme and renamed to file to match the correct menu ID

    2) The Menu block positioned in the block layout needed to have the option Expand all menu items enabled.

    Nothing to do with JS.

  • Status changed to Closed: works as designed almost 2 years ago
  • πŸ‡¦πŸ‡ΊAustralia VladimirAus Brisbane, Australia

    Thanks @kevin.pfeifer

  • πŸ‡¦πŸ‡ΉAustria inst

    THANKS @kevin.pfeifer from me too!

Production build 0.71.5 2024