WP Rocket Compatibility

This topic contains 6 replies, has 2 voices, and was last updated by  wowmatt 4 months, 1 week ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #18880

    wowmatt
    Participant

    Hi,

    Following up on our discussion on Codecanyon.

    When I enable “Load JavaScript deferred” with WP Rocket this causes issues with Related Posts Pro where all the related posts go below each other instead of side by side, are you aware of this issue?

    Related Posts Pro is the only plugin I am having issues with after enabling this setting.

    The FTP login will take you straight into the wp-content folder.

    Please note the site is live, also if you want a login to the WP admin I need your WordPress.com email as we use Jetpack SSO for security, standard logins are disabled.

    Thanks.

    #18881

    Ernest Marcinko
    Keymaster

    Hi!

    Thank you very much for the details.

    I have made a minor modification to the init script, although I could not test the defer method obviously. Can you please try to enable it now, then clearing your site cache to see if it works correctly?

    Thank you!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #18882

    wowmatt
    Participant

    Hi Ernest,

    No sorry still the same issue 🙁

    I don’t mind leaving the defer setting on for a while for you to test but you still wouldn’t’ be able to clear the cache.

    Let me know if you want me to setup a wordpress admin login.

    #18883

    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #18884

    wowmatt
    Participant

    Hi Ernest,

    No problem I have gone ahead and added this email you can login here:
    http://www.ukairdates.com/wp-admin

    I have also attached 2 screenshots. You want to go over to Settings -> WP Rocket then the File Optimisation page (wprocket-fileoptimization.png). Then at the bottom of this page the defer setting (defersetting-screenshot2.png) simply enable this to test.

    To clear the cache make sure to “Clear Cache” and “Clear Cloudflare Cache” to 100% clear everything. You can clear both of these in the top admin bar under “WP Rocket”

    Thanks.

    Attachments:
    You must be logged in to view attached files.
    #18887

    Ernest Marcinko
    Keymaster

    Hi,

    I have managed to bypass the problem, it was almost exactly what I thought, but instead of the plugin script not being loaded, the jQuery was not loaded – as it is also defered by the WP Rocket tool.

    Please keep in mind, that even if I was able to bypass the problem, there are still other scripts on the page that are also loaded inline, and reporting the same problem in the console: https://i.imgur.com/CPbUI3k.png
    Some of them are reffering to lines like this: https://i.imgur.com/4tASrB6.png
    (these are present even if the plugin is disabled, they are unrelated)

    Basically, the inline scripts are not deferred (they cannot be), so they are executed before the jQuery itself is loaded. However these inline scripts use jQuery, so they fail at the first line. In our plugins case, I have resolved it by introducing an endless loop, which checks periodically if the jQuery is finally loaded, then breaks then initializes and breaks the loop afterwards.

    I honestly does not recommend using the defer method, unless you have experience with dealing with the script optimizations/fixes, that may be required, such in this case.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #18888

    wowmatt
    Participant

    Ah OK I see. I guess we should just leave this disabled then if there are other hidden issues also. 🙁

    Thanks for your help anyway!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.