Pull down menus stopped working

After changing settings in a caching plugin (Litespeed Cache), my pull down menus (both when using mobile and desktop) stopped working.

I’m wondering if there is some JS/CSS I need to work with to make the pulldowns work again. Like maybe exclude some JS/CSS in the plugin settings.

How can I make the pulldowns work again with the Litespeed Cache plugin?

Hello @rfh123,

Thanks for writing in!

I have checked your site URL and it appears that there is a JS error:

Uncaught SyntaxError: Unexpected token '<'

Solution 1:

Please do check your custom JS code that you have added in X > Theme Options > JS. Make sure that your custom JS code is valid and correct.

Solution 2:

Aside from your LiteSpeed Cache plugin, you have RocketLoader or WP Rocket plugin. I also found out that you are using Cloudflare. You may need to log in to your Cloudflare account and purge your site cache as well.

If nothing is helping, we would be happy to check your site if you can provide us your login credentials. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Hi Rue: I added a “secure note”. I was expecting to see that icon under your reply to me, but only saw it under my original post, so that’s where I added it. I hope I did this correctly.

Bob

Hi Bob,

Thank you for the credentials, I saw the script that was causing the issue, it’s under X > Theme Options > JS, I’m not sure what that script is for, but I remove that for now, and that resolves the issue.

There is a syntax error in the script so it might be incomplete, where did you get that script? Can you recopy it?
And use this plugin for inserting that script, that is a safer way than adding it on X > Theme Options > JS since its wrap with <script> tags.

Cheers,

Yes, I saw that script as well, but I have no idea what it’s for or how it got there. I may have done it years ago and just don’t remember.

I use another plugin that let’s me put script into headers and footers (Header & Footer Scripts by Digital Liberation). I added the script you mentioned there.

I thank you for fixing the issue I contacted you about, but it seems that my website is a little slower now according to Google page insights. Is that because that script is in a different place on my website now?

My whole reason for making adjustments to my Litespeed Cache plugin is to make my website faster (especially for mobile). It’s frustrating that when I finally got my website page speeds much faster with the adjustments to the caching plugin, it negatively affected something else with my website.

Please let me know if you have any insights on improving page speed in a way that works for Xtheme.

Thanks for all your help. I really appreciate it.

Hi Bob,

I’ve searched a bit about that script and it seems to be a Microsoft Advertising tracking code.

Yes, you can use that Header & Footer Scripts by Digital Liberation instead.

Moving the script has nothing to do with the page speed, it should actually improve the performance a bit since it’s not triggering a syntax error anymore.

The Litespeed Cache might have been cleared so it becomes a bit slow (rebuilding page cache), can you try to preload the cache (not sure if Litespeed Cache has that option though).

We have a few performance tips on our Youtube Channel, you might want to try a couple of them.

Thanks,

Once again, thanks for all you help!

I will check out your Youtube channel.

Hi Bob,

Glad that we are able to help you, please let us know if you need any further help.

Thanks

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