All threads / Why isn't the Boostrap Dropdown not working in the menu after loging in ?

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Why isn't the Boostrap Dropdown not working in the menu after loging in ?

Damian Nelwep asked in Javascript

Hello, I started an app using the Jumpstart shortcut but didn't find out how and why the dropdown menu with the user's photo wasn't working at all... I guess it is because of javascript but after checking every aspect of the view code, I came to the conclusion that it was some javascript related issue... Can anyone help me about this..? Thank you in advance

It's your standard bootstrap dropdown, so double check and make sure there are no JS errors in the browser console.

I'm not at the computer right now, but I can take a look tomorrow hopefully.

Hi Chris,
indeed there seems to be some error in the javascript console :

SyntaxError: '/' is not a valid selector bootstrap.self-71784756e8d3ffaa8c7ffebc434ed774344cdf0d46c66c6af4a62d4504ef7ba3.js:150 
    getSelectorFromElement
http://localhost:5000/assets/bootstrap.self-71784756e8d3ffaa8c7ffebc434ed774344cdf0d46c66c6af4a62d4504ef7ba3.js:150:26
_getParentFromElement
http://localhost:5000/assets/bootstrap.self-71784756e8d3ffaa8c7ffebc434ed774344cdf0d46c66c6af4a62d4504ef7ba3.js:1906:22
_getMenuElement
http://localhost:5000/assets/bootstrap.self-71784756e8d3ffaa8c7ffebc434ed774344cdf0d46c66c6af4a62d4504ef7ba3.js:1758:22
Dropdown
http://localhost:5000/assets/bootstrap.self-71784756e8d3ffaa8c7ffebc434ed774344cdf0d46c66c6af4a62d4504ef7ba3.js:1590:20
_jQueryInterface/<
http://localhost:5000/assets/bootstrap.self-71784756e8d3ffaa8c7ffebc434ed774344cdf0d46c66c6af4a62d4504ef7ba3.js:1838:18
each
http://localhost:5000/assets/jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js:371:10
each
http://localhost:5000/assets/jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js:138:10
_jQueryInterface
http://localhost:5000/assets/bootstrap.self-71784756e8d3ffaa8c7ffebc434ed774344cdf0d46c66c6af4a62d4504ef7ba3.js:1832:14
<anonymous>
http://localhost:5000/assets/bootstrap.self-71784756e8d3ffaa8c7ffebc434ed774344cdf0d46c66c6af4a62d4504ef7ba3.js:2004:5
dispatch
http://localhost:5000/assets/jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js:5226:16
add/elemData.handle
http://localhost:5000/assets/jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js:4879:6

I don't know why but I can't answer to this..

well I can't paste what I copy on clipboard so I'll put a link to a file / page

ttp://damwork.com/wp-content/uploads/2019/01/js_error.txt

(just put the h before the rest and you'll get to the message...) I'm sorry I don't understand why but apparently I can't put any url in my message without having it not displayed.
Thank you and wishing you a sweet day

Dropdown is fixed now. Just change the root_path in the link_to for the dropdown navbar.html.erb to "#".

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,344+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.