Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It used to be that a dropdown would appear when the browser width was too small to display the main menu, but that doesn't seem to show up anymore. Therefore, on mobile devices it is impossible to navigate. Am I missing something? Is there anything that could cause this?
Comments
Comment #1
drupalninja99 CreditAttribution: drupalninja99 commentedI will take a look
Comment #2
drupalninja99 CreditAttribution: drupalninja99 commentedHello there, I was not able to reproduce this issue. Please review my jing video here: http://screencast.com/t/PPz7EqVy.
While looking at this I did notice an issue with the Superfish module that I have corrected in 7x dev, but it is a separate issues where a 'main menu' label was popping up.
Comment #3
drupalninja99 CreditAttribution: drupalninja99 commentedPushed this out to 7.x-1.11: https://drupal.org/node/2187269
Comment #4
mr_unicorn CreditAttribution: mr_unicorn commentedAlthough I have not updated to 7.x-1.11 yet, I skimmed through the HTML and by comparing it with a very old OpenChurch site that's nav bar worked correctly, I noticed that in my site the HTML and Javascript that is required to make the
dropdown menu appear and function are in a CDATA section, so they aren't being parsed, and the mobile navbar is therefore not functioning properly. Seen anything like this before?
Comment #5
mr_unicorn CreditAttribution: mr_unicorn commentedComment #6
drupalninja99 CreditAttribution: drupalninja99 commentedIt's very common for JS to run btwn CTDATA.
Comment #7
mr_unicorn CreditAttribution: mr_unicorn commentedbut its not running...
Comment #8
mr_unicorn CreditAttribution: mr_unicorn commentedWait - never mind. I had a dumb moment there.
Comment #9
mr_unicorn CreditAttribution: mr_unicorn commentedOkay so:
The
<div>
that should contain the<select>
element for the mobile menu is for some reason not getting included in the page output. The id of this div was block-menu_block-1 in earlier versions, and I cannot find this div in the page output. For the desktop navbar, the block-superfish-1 div element seems to be used, and that is working correctly and can be found in the HTML. It's just the mobile navbar that isn't getting included, which would explain why it doesn't show. What OpenChurch default block would correspond to block-menu_block-1? (I am trying to see if it might possibly be disabled).Comment #10
mr_unicorn CreditAttribution: mr_unicorn commentedWhat's weird is that references to the block (its id) occur in CSS and jQuery that is included in the page output, but the actual block (its
<div>
element) doesn't exist in the page. Would an example help?Comment #11
drupalninja99 CreditAttribution: drupalninja99 commentedHi @appleunicorn you did some good research on this. I bet the CSS id changed. Let me see if I can find the correct setting. I bet you will need to update the tinynav configuration.
Comment #12
drupalninja99 CreditAttribution: drupalninja99 commentedYou will want to go to "admin/config/user-interface/tinynav" and change "CSS / jQuery selector" to #block-menu-block-1 ul.menu. That should fix the issue.
Comment #13
mr_unicorn CreditAttribution: mr_unicorn commentedI changed this, but it did not solve the issue. There is no
<div>
element on the page HTML with an id of #block-menu-block-1. In fact, there isn't a single<select>
element in the page at all either.Comment #14
mr_unicorn CreditAttribution: mr_unicorn commentedThe HTML makes this sound like it's a separate block. Any chance this block could be disabled in my configuration? (How would I re-enable it?)
Comment #15
drupalninja99 CreditAttribution: drupalninja99 commentedCan you look at the source and search for 'menu-block'. What was the old version of OpenChurch were you upgrading from? Thx!
Comment #16
drupalninja99 CreditAttribution: drupalninja99 commentedYou will want to go to /admin/structure/context/list/openchurch-all-sitewide/edit and make sure the mobile menu block is enabled and placed in the navigation area. You could revert that context but then you might lose customizations you have made.
Comment #17
mr_unicorn CreditAttribution: mr_unicorn commentedA search for "menu-block" did not yield anything besides the tinynav code and various administrative menu items. There is no block with the name "Mobile Menu", or anything to that effect at /admin/structure/context/list/openchurch-all-sitewide/edit.
This was actually a fresh install. The old version I was referring to is on a separate server and was created quite a while ago.
Comment #18
mr_unicorn CreditAttribution: mr_unicorn commentedI just solved the issue. I don't have at this very moment to write up an explanation of how I fixed it, but you were very close with your guess that the block id had changed. I will try to write a brief explanation once I get a moment later. Not sure what status you want to set this issue to for the moment.
Comment #19
kjv1611 CreditAttribution: kjv1611 commentedappleunicorn,
When you find the time, could you update this thread with how you fixed the issue? Thanks. It'd be interesting to see what the fix was.
Comment #20
drupalninja99 CreditAttribution: drupalninja99 commentedHi @appleunicorn yes I need some help on this bc I cannot recreate the problem on my end.
Comment #21
drupalninja99 CreditAttribution: drupalninja99 commentedI would recommend upgrading to 2x which has a much improved mobile experience.