accordion not working with LiteSpeed

Ticket for: Accordions Combo
0
accordion not working with LiteSpeed 1
Dale Sellers
Dec 18, 2020 11:23 PM 1 Answers
Member Since Jun 2020
Subscribed Subscribe Not subscribe
Flag(0)

We use WordPress LiteSpeed Cache (2 million downloads). there is a feature to speed up site by enabling option: "Load JS Deferred"

When I have "Load JS Deferred" selected, it breaks the accordion to where it's not even visible. LiteSpeed has a place to enter js scripts to exclude (so LiteSpeed won't defer script). I entered....

/wp-content/plugins/accordions/assets/frontend/js/scripts.js

...but the accordion is still broken. Is there maybe another js script from accordion I can try to exclude from LiteSpeed? Or, is there another method I should use to make your plugin compatible with WP LiteSpeed Cache?

 

2 Subscribers
accordion not working with LiteSpeed 1
accordion not working with LiteSpeed 3
Submit Answer
Please login to submit answer.
1 Answers
Sort By:
Best Answer
0
accordion not working with LiteSpeed 4
PickPlugins
Dec 19, 2020
Flag(0)

Welcome to our forum.

have you checked browser console area? accordions could break if your page contain js error on the page, you will have to js error first of happening.

Please send me your accordion page url.

Regards

accordion not working with LiteSpeed 5
Flag (0)
0

Here is the link to test accordion on our site:

https://www.visionrise.com/acctest/

Right now, I have the "Load JS Deferred" setting in the WordPress LiteSpeed Cache plugin disabled. This is why you can see the accordion.

Yes, there is a js error in console WHEN Accordion Plugin and the "Load JS Deferred" setting in the WordPress LiteSpeed Cache plugin are both ENABLED.

My guess it's being created by the incompatibility between the Accordion Plugin and the WordPress LiteSpeed Cache plugin.

But when I disable the "Load JS Deferred" setting in LiteSpeed, the console error disappears and the accordion works fine (like it does now).

This leads me to think the some js file in your plugin does not like to be deferred with the WordPress LiteSpeed Cache plugin.

My plan is to tell LiteSpeed to not defer the js scripts in your plugin. This way, I can have the "Load JS Deferred" setting in LiteSpeed enabled, and have the LiteSpeed plugin ignore the js files in your plugin.

To test this, I just to know all the js files that your plugin emloys. This will allow me to enter them into the LiteSpeed plugin (in the exclusion area). So far, I only have this script on the frontend:

/wp-content/plugins/accordions/assets/frontend/js/scripts.js

Are there any other scripts in your plugin that you suggest I try to exclude from LiteSpeed? If so, please give me the path/string of each script.

Sign in to Reply
Replying as Submit