Created a new subtheme based on the LESS starterkit. Created few menu entries and submenus under "Main Navigation". For menu entries with submenus, selected "Show as expanded" for parent menu entry. The caret appears showing that there are submenu items for the menu entry, but on clicking the parent menu item nothing happens.

Tried the same with bootstrap base theme without changing any other configuration and now the dropdown menu works.

Generated HTML for both base theme and subtheme looks the same, below is an example for one of the menu entry with submenu.

<ul class="menu nav navbar-nav">
    <li> <a href="{link}" data-drupal-link-system-path="node/1">{Parent Manu-1}</a> </li>
    <li class="expanded dropdown"> <a href="{link}" class="dropdown-toggle" data-target="#" data-toggle="dropdown">{Parent Menu-2}<span class="caret"></span></a>
        <ul class="menu dropdown-menu">
            <li> <a href="{link}" data-drupal-link-system-path="{path}">{Sub Menu}</a> </li>
        </ul>
    </li>
....
</ul>

Comments

Jaya M created an issue. See original summary.

Jaya M’s picture

Issue summary: View changes
Jaya M’s picture

Issue summary: View changes
Jaya M’s picture

Resolved the issue by removing "bootstrap/js/dropdown.js" from {THEMENAME}.libraries.yml file.

markhalliwell’s picture

Status: Active » Closed (works as designed)
millionleaves’s picture

Confirmed that this issue also occurs for the SASS starterkit, and the solution documented here solves the problem. This is the only place I could find that provided this solution. Adding a new issue to cover adding this instruction to the sub-theming guide.

markhalliwell’s picture

There's no need to create a new issue. This is expected behavior if there is more than one plugin (script) being loaded. See my comment here: #2797453-2: LESS/SASS Bootstrap Starter Kit documentation incomplete (disable CDN?).

millionleaves’s picture

Ah ... got it. I had Bootstrap locally but still had the CDN version enabled as well. Thanks for clarifying.