Uncaught Error: Syntax error, unrecognized expression: #
    at Function.ga.error (VM1178 jquery.min.js?v=3.2.1:2)
    at ga.tokenize (VM1178 jquery.min.js?v=3.2.1:2)
    at ga.select (VM1178 jquery.min.js?v=3.2.1:2)
    at Function.ga [as find] (VM1178 jquery.min.js?v=3.2.1:2)
    at r.fn.init.find (VM1178 jquery.min.js?v=3.2.1:2)
    at new r.fn.init (VM1178 jquery.min.js?v=3.2.1:2)
    at r (VM1178 jquery.min.js?v=3.2.1:2)
    at getParent (VM1251 dropdown.js?p0kcc9:32)
    at HTMLAnchorElement.Dropdown.toggle (VM1251 dropdown.js?p0kcc9:63)
    at HTMLDocument.dispatch (VM1178 jquery.min.js?v=3.2.1:3)

I get this javascript uncaught error in the latest version 8.x-3.7 and the latest dev version 8.x-3.x-dev!

The error appears when I click on one of the main menu items, but the menu items still opens.
And the error appears when I click on the expand icon (down error or similar) in the mobile menu and the menu does not expand. This is a great problem, I need a quick solution.

I did not change the bootstrap framework itself, I only updated the Bootstrap Theme to 8.x-3.7 and updated Drupal 8.3.7 to Drupal 8.4.2 before.

Can you help me to find out how to patch this?
Thank you very much.

Comments

drupalfan2 created an issue. See original summary.

markhalliwell’s picture

Status: Active » Closed (duplicate)
Related issues: +#2903656: Updating to Drupal core 8.4.0-beta1 results in not working dropdown menu
drupalfan2’s picture

I have already found out that this is a duplicate, but you didn't tell it me in my first comment. It is much easier for all if you tell people that there are already some solutions for the reported things.

markhalliwell’s picture

This project has already been fixed. If you're still encountering this issue, then either 1) you don't truly have the latest code (try removing the entire folder and then redownloading it) or 2) you have a sub-theme that implemented its own template(s) which you must manually change based on the above issue's fix.

drupalfan2’s picture

Thank you for your info.

drupalfan2’s picture

I removed
data-target="#"
in menu-main.html.twig of my subtheme of Drupal Bootstrap 8.x-3.7. So I do not use the dev version.
This works, is there something else to do?