- This topic has 12 replies, 3 voices, and was last updated 1 year, 3 months ago by Tom.
June 24, 2019 at 7:53 am #939651Ryan
I’m having difficulty with users not able to navigate with the primary menu bar on mobile devices. After a little digging I believe I’ve narrowed it down to this file:
I used Chrome Developer Tools to simulate a mobile device that is large enough that the menu bar doesn’t collapse (the collapsed menu works fine) and found that the issue still exists there as well. I’m getting this error whenever I click on a menu item. Typically, you need to click the top menu item twice for the dropdown to apepar, then if you click anything in the dropdown it will just close it without redirecting.
Uncaught ReferenceError: closeDropdown is not defined
at HTMLLIElement.<anonymous> (a11y.min.js?ver=2.3:formatted:42)
(anonymous) @ a11y.min.js?ver=2.3:formatted:42
I’ve attempted defining the variable by adding this to the non-minified and then minifying it again:
No luck there. It prevented this error from popping up but I got a different error related to the this.classList.remove(“sfHover”). I believe it was saying that “this” is undefined.
Any help with getting my menu to work for mobile items would be much appreciated.
Thank you!June 24, 2019 at 10:10 am #939778TomLead DeveloperLead Developer
This is a current bug in 2.3 which will be fixed in 2.3.1.
If you’d like to test the fix (I’d appreciate it), you can see the changes here: https://github.com/tomusborne/generatepress/compare/release/2.3.1
If you want to simply replace a11y.min.js, you can find the updated version here: https://github.com/tomusborne/generatepress/blob/release/2.3.1/js/a11y.min.js
Thanks!June 24, 2019 at 10:25 am #939790Ryan
Thank you so much for the quick reply!
I’ve replaced a11y.min.js in /generatepress/js and it seems to behave as expected now.
Thanks so much for your help Tom!June 24, 2019 at 10:26 am #939791TomLead DeveloperLead DeveloperJune 24, 2019 at 11:39 pm #940184Damiaan van Vliet
Hi Tom, I have (nearly) the same problem and replaced the file with the 3.2.1 version but still no luck. Would you please have a look? I don’t see the JS error messages, just nothing happens when clicking top menu.
URL: flowerracket EN siteJune 25, 2019 at 8:29 am #940758TomLead DeveloperLead Developer
It looks like the Secondary Nav isn’t opening on mobile. I can’t replicate on my side, so make sure you’re using the latest version of everything, and disable your plugins one by one to check for conflicts.June 25, 2019 at 10:58 am #940915Ryan
Hey Damiaan van Vliet,
I click on your top navigation and it is taking me to the new urls with different translations. Could you let me know what plugin you are using for translations? Is that PolyLang?June 26, 2019 at 4:45 am #941581Damiaan van VlietJune 26, 2019 at 4:52 am #941584Damiaan van Vliet
@tom I disabled all plug-ins except GP Premium of course. Same problem.
I enabled debugging and got an error message:
“Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; WPAlchemy_MetaBox has a deprecated constructor in /domains/websitename.nl/public_html/wp-content/plugins/gp-premium/addons/generate-sections/inc/wpalchemy/MetaBox.php on line 55”June 26, 2019 at 5:37 am #941633Ryan
Just FYI, I noticed later yesterday and same today that some devices still are showing that issue if cache hasn’t been cleared on that device (very easy to forget about this for mobile devices).June 26, 2019 at 9:03 am #942039TomLead DeveloperLead DeveloperJune 27, 2019 at 10:26 am #943117Damiaan van Vliet
Ah Tom thanks! So that’s the problem.
I did not notice the version info but have updated all plug-ins and themes so thought I have everything updated.
I will manually update GP Premium and I am sure that the problem than is resolved 😉June 27, 2019 at 10:47 am #943132
- You must be logged in to reply to this topic.