Mobile menu not working (works in Customizer)

I oversee a website that uses the X Theme (X- Child, specifically). It is running on PHP 7.2 and WordPress 5.0.3, but didn’t work before these upgrades, either. In fact, I have another version of the site running on PHP 7 and WP 4.9.9 where it’s not working.

I have updated Cornerstone and X-Theme to their most recent versions (3.4.6/6.4.6), but that doesn’t make it work either. Sidenote: The 6.4.6 breaks my layout so I had to revert it back to 6.2.5 but, since the update didn’t resolve my problem, that’s not an issue here).

I even built a brand new page, where I created a very basic Show/Hide toggle to see if it would work with some basic jQuery I wrote for it and threw in its own file to load. And it didn’t. But here’s where I found something interesting during this: if I open the WordPress Customizer (which I’d done to add some display:none CSS for that toggle I built), the mobile menu works. But it doesn’t again once the Customizer is closed again.

I’ve already gone through and disabled every plugin, and the menu still didn’t work. I also changed to the default WordPress themes, and it did work there. This leads me to believe it’s related to X Theme itself.

Now, if there’s a way to just rebuild that mobile nav entirely, I’ll do that. Or, if you need a login to get in and look around, that’s fine, too. But I’m not sure what to do from here as it seems to not be a plugin conflict but I WAS able to isolate the theme itself seems to break it.

Help?

Hi Eric,

Thanks for writing in! Upon checking, I see that you have plenty of licenses so I’m not sure what’s your website URL that you’re referring to. Please follow the troubleshooting methods below to isolate your issue.

If you have added any custom JavaScript codes into your site, remove them temporarily and re-test your issue further.

If you’re using a child theme, please disable it temporarily and see if your child theme customizations are causing this issue.

If you’re still having issues (though you have mentioned that you have tested for a plugin conflict), you need to test for a plugin conflict by disabling your third party plugins. If the issue resolved, then you can activate your plugins one by one to see which plugin causing the issue.

As to PHP version, we recommend PHP v5.6.x or later to avoid any incompatibility issues. Also you can enable WP_DEBUG mode and test your site to see if you’re getting any error messages (https://codex.wordpress.org/WP_DEBUG).

If you’re using a caching plugin on your server, you need to clear full cache before testing each test cases. you can refer to the following article on how to clear full cache (https://www.wpbeginner.com/beginners-guide/how-to-clear-your-cache-in-wordpress/). Also if you’re using a CDN cache like CloudFlare, you need to clear it’s cache as well by login into your CDN account.

In case if you cannot isolate your issue, please provide us with your WordPress login credentials in a secure note to check your issue further.

Let us know how it goes.
Thanks!

Hi, mldarshana,

[quote=“mldarshana, post:2, topic:53374”]If you’re using a child theme, please disable it temporarily and see if your child theme customizations are causing this issue.

If you’re still having issues (though have mentioned that you have tested for a plugin conflict), you need to test for a plugin conflict by disabling your third party plugins. If the issue resolved, then you can activate your plugins one by one to see which plugin causing the issue.
[/quote]

Yep, already did both of these, as mentioned in my original post.

[quote=“mldarshana, post:2, topic:53374”]
As to PHP version, we recommend PHP v5.6.x or later to avoid any incompatibility issues. Also you can enable WP_DEBUG mode and test your site to see if you’re getting any error messages (https://codex.wordpress.org/WP_DEBUG). [/quote]

As I said in my original post, I am using PHP 7 and/or 7.2 on my sites.

I’ve followed those exact steps to clear my cache, observing changes as I refresh (especially when toggling the plugins off).

On the whole, your reply seems to have ignored specific items I took the time to list as things I had already tried or cited for informative purposes in troubleshooting, and neglects that I mentioned that the Customizer allows for the mobile menu to work, but the mobile menu does not work when the Customizer is closed.

If you have any insight into why that may be the case, I’d welcome that support. But I also feel I may need to create a login for someone to get in there and take a look (on a Dev branch, naturally). Just let me know which way to proceed from here.

Thanks!

Hi,

Yes, please provide us your wordpress admin login in Secure Note so we can better assist you with this issue.

Hi, Paul,

Thank you. I updated my previous reply by clicking Secure Note and adding the username/password for the site. I also added a URL to the aforementioned test page I had built simply to test the Show/Hide toggle. But, of course, it’s the mobile menu not working. You can test on either/both pages, and see that they each work (if you shrink the browser width until the mobile menu displays) when the Customizer is open, but not when it closes.
This is a Dev branch, so have at it and let me know what you find out.

Thanks.

Hey Eric.

I’m sorry but the provided credentials does not work. Would you mind checking it again? Please also switch to the parent theme and disable all third party plugins so they won’t affect our investigation. I see errors coming from third party scripts.

Thanks.

Hi, Christian,

I updated the login/password for that account and tested it. It works now and you can log in. Have at it!

Hello Eric,

Thanks for updating in! Your mobile menu is not working because you have added custom JS files in your child themes which has JS errors. The JS errors in those files prevented the mobile menu from working. It will affect other features of the site as well if you JS errors will not be resolved. Please switch back to the parent theme and you will see that without JS errors, the mobile menu will work.

You might need to consult the creator of the JS files you have added in the child theme for further troubleshooting.

Regards.

Hi, @RueNel - are you able to tell me where these JS files live, for me to tweak (even just removing/putting back in) to troubleshoot? Is it in a specific file of the child theme (functions.php? a header framework file? etc)? Just wondering if you can help with that portion.
Thanks!

Hi Eric,

Those first couple of JS errors (see secure note) might be the culprit of the issue. I have tested it in parent X Theme and the mobile menu works.

Regretfully, we cannot provide support for third party scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.

Thank you for your understanding.

Great, thank you so much for helping troubleshoot this!

You are most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.