Playing with LiteSpeed Cache (LSC) plugin for WordPress and found it caused one plugin (Revolution Slider) not working.
Error: Uncaught ReferenceError: setREVStartSize is not defined
The slider plugin's function
<script type="text/javascript">setREVStartSize({
is rewritten by the cache plugin to
<script type="text/javascript">document.addEventListener("DOMContentLoaded", function() { setREVStartSize({
But this event was not fired.
Here is a comparison of function setREVStartSize after/before LSC is enabled
https://editor.mergely.com/yp8ZF9dP/ (Please click Options -> Wrap Lines and Ignore White Space)
- Left : when LSC is enabled
- Right: when LSC is disabled
The only difference is how and when the function is fired.
Here is a comparison of how the slider calls the function:
https://editor.mergely.com/vuoEakJB/ (Please click Options -> Wrap Lines and Ignore White Space)
- Left : when LSC is enabled
- Right: when LSC is disabled
This seems to be a bug. I am not sure if the plugin developer will or when will fix the bug. Anything that I can do on my own to fix it?
Thanks!