Hi,

My horizontal menu and the burger menu are showing but nothing happens when I click on the burger menu.
I've checked and the mmenu js is loading

<script src="/pptheme8/libraries/mmenu/dist/js/jquery.mmenu.all.min.js?v=8.1.1"></script>
Is there something else I'm missing?

Thanks,
Rita

Comments

Raher created an issue. See original summary.

tanc’s picture

Hi Rita,

Do you see any javascript errors in the console?

Raher’s picture

Hi Tanc,

All I see is this

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/. ajax.js?v=8.1.1:1060

Thanks

tanc’s picture

Do you see the html for the off-canvas menu near the bottom of your page's html? It should start with something like:

<div class="off-canvas-wrapper"><div id="off-canvas">

              <ul class="clearfix menu">
                    <li class="menu-item">
        <a href="/" data-drupal-link-system-path="&lt;front&gt;">Home</a>
...

Also, are all of your scripts loading from /pptheme8 as the root? In your example of where the mmenu library is loading from it is prefixed with /pptheme8 whereas all my scripts load from /

For example:

<script src="/core/modules/contextual/js/views/VisualView.js?v=8.1.1"></script>
<script src="/modules/responsive_menu/js/responsive_menu.config.js?v=8.1.1"></script>
<script src="/libraries/mmenu/dist/js/jquery.mmenu.all.min.js?v=8.1.1"></script>
<script src="/core/assets/vendor/jquery.ui/ui/position-min.js?v=1.11.4"></script>
Raher’s picture

Hey Tanc,

Yep it's showing my subfolder pptheme8 not sure how I can change that...

The menu is loading at the html at the bottom of the page tho.

Thanks,
Rita

tanc’s picture

Hi Rita,

Without knowing more about your hosting environment I can't recommend any solutions. Do all your scripts load from your subfolder /pptheme8 ? Or is it just the mmenu one?

Raher’s picture

yes they all load from the subfolder...

tanc’s picture

Hi Rita, I've been away for a bit and I'm now at a conference but I'll try and help, although I'm not really sure what to suggest. Is there anyone you work with or another peer that might be able to help? Its quite hard to diagnose from afar and I don't know enough about your development or hosting environment to suggest changes. If you can give me reproducible steps so I can emulate your environment I might be able to help.

tanc’s picture

Status: Active » Closed (works as designed)

I'm closing this but feel free to re-open if you're unable to get things working.

Denis Waßmann’s picture

Hi tanc,

same Problem here ... The menu is loading at the html at the bottom of the page. When i invite the Javascript sites/all/libraries/mmenu the links at the bottom of the page are away but no canvas opens. You can see the Problem here

Thank you for your help!

Denis Waßmann’s picture

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

Same for me as #10.

tanc’s picture

Version: 8.x-2.3 » 7.x-2.5

Hi Denis, can you confirm which version of jQuery you're using? Looking at your loaded js it looks like the Drupal default 1.4.4 is being loaded. You'll need to update to a newer version using jquery_update module if that is the case. You're also on Drupal 7 and this issue was about Drupal 8 problems. I'll change it over to D7 and we can continue here for now.

Denis Waßmann’s picture

Status: Active » Closed (works as designed)

Hi tanc, thx - it really seems to be an jQuery-Problem. When i set it on 1.5 nothing happens. When i set it higher, canvas works, but the styles on my Page make Problems, so i have to solve this. Sorry for the Issue-Mistake ... i was never active in this Forum ... in the future I'll look/read better.

tanc’s picture

Hey no problem! Glad you're on the road to fixing your issue

pkosenko’s picture

I have this same issue. The menu gets written to the bottom of the page (but not hidden), but when the responsive icon is clicked, the canvas menu does not appear, and the browser simply scrolls to the bottom menu.

For some reason "responsive_menu.config.js" is NOT being written to the page in a script tag, although it is listed in the set of Javascripts include in the Drupal object. This happens even when I try to move the script reference over to the them as a script[]= reference in the theme .info.

This from the responsive_menu.module file:

$page['page_bottom']['#attached']['js'][] = array(
'data' => drupal_get_path('module', 'responsive_menu') . '/js/responsive_menu.config.js',
'type' => 'file',
'scope' => 'footer',
'group' => JS_THEME,
'weight' => 20,
);

The particular site has a front page theme deployed (using the "theme_key" module) that is different from the site theme.

I notice that the front page theme is missing a "page_bottom" DIV.

But maybe that is not the issue. Adding the region to the theme .info DID NOT fix the problem.

Listing what tags ARE required by the Javascript plugin might help me figure out why the Drupal configuration script is NOT being output into the page.

tanc’s picture

Correct, it will be the missing page_bottom region that this module requires to output the needed divs and attach the required javascript.