We are trying to use this module in our custom theme but it is showing menu at the bottom of the page and when i click the menu icon, focus of the page goes to the bottom. And also in Url it show #off_canvas.
Version Tried:
Responsive_Menu - 7.x-3.6
MMENU - 8.5.14 and also tried with 8.5.0
Drupal core - 7.69
Jquery - 1.7
We have tried all the possible solutions provided as part of previous issues.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | mmenu_without_horizontal-3165221-7.patch | 7.17 KB | tanc |
Comments
Comment #2
chitrakanagaraj commentedWithout even placing Responsive Menu into any region menus (#off_canvas) is getting added to bottom of the html page.
Comment #3
tancTo help debug can you tell me:
Comment #4
chitrakanagaraj commentedWe were able to resolve the above issue by resolving jQuery conflict. but now we are getting below error so our landing page is not loading.
responsive_menu.config.js?qf79y3:15 Uncaught TypeError: Cannot read property 'position' of undefined
at HTMLBodyElement. (responsive_menu.config.js?qf79y3:15)
at Function.each (jquery.min.js?v=2.1.4:2)
at $.fn.init.each (jquery.min.js?v=2.1.4:2)
at $.fn.init.$.fn.once (jquery.once.js?v=1.2:55)
at Object.attach (responsive_menu.config.js?qf79y3:8)
at Object. (behavior_weights.js?qf79y3:61)
at Function.each (jquery.min.js?v=2.1.4:2)
at Object.Drupal.attachBehaviors (behavior_weights.js?qf79y3:59)
at Object.Drupal.attachBehaviors (behavior_weights.js?qf79y3:66)
at HTMLDocument. (drupal.js?qf79y3:593)
Comment #5
tancI've just installed a fresh site with version 7.x-3.6 of this module and the latest version of mmenu and I cannot replicate your issue.
From the error you've posted it looks like
Drupal.settings.responsive_menu.positionis not available inresponsive_menu.config.js. The only way I can think of that this can happen is if you haven't placed theResponsive menublock on the page.Note to self: it might be best to move that code out of the block preprocess code and into
hook_page_buildso that it is always available and will allow the user not to add the horizontal menu if they don't want it.Comment #6
tancHave updated the description of this issue as the error is occurring (in my opinion) due to not placing the horizontal
Responsive menublock in a region. This should not throw errors in my opinion and a feature would be to use the off-canvas mmenu without having to place the horizontal menu, which brings it in line with the Drupal 8 version.Comment #7
tancCan you test this patch and see if your issue is fixed (without placing the Responsive menu block)?
Comment #8
vistree commentedHi @tank,
Same situation on my project: vertical navigation and responsive menu horizontal menu NOT in use!
Tested patch from #7 - and it works absolutly great for me. Burger menu is showing up correctly and off-canvas menu is displayed correctly respecting all the module configurations ;-)
Great work!!
Comment #9
tancFantastic, thank you for reviewing and confirming the patch works. I'll issue a new release shortly.
Comment #11
tanc