Support » Plugin: WP Cloudflare Super Page Cache » Error: undefined r.getClientRects is not a function

  • Resolved outcats85

    (@outcats85)


    Everytime I clear the cache I get this error: Error: undefined r.getClientRects is not a function

    But it does seem to work. Any idea why?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi @outcats85,
    Can you share the screenshot of your chrome developer console so that we can see from which file it is being thrown from? Maybe some other plugin is causing the issue. Please share as many proper screenshots you can for clear understanding.

    Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi @outcats85,
    Thanks for the image. I took a deeper look and saw that the function that is throwing the error is not part of our code at all. It is part of jQuery UI library which this plugin uses to show alert messages, faq section etc.
    I’m certain that some other plugins you have installed in your site which is either removing the jQuery UI from the source code or not letting it load. And as jQuery UI library is not loaded so you get this error.
    Unfortunately, this is not a plugin issue. You can try disabling your plugin one by one to see when the issue goes away so that you can identify which plugin of yours is causing the jQuery UI loading issue.
    If you want you can Google search about TypeError : r.getClientRects and you will see that jQuery UI is not loading properly is causing this issue.

    I disabled the jquery. Didn’t know your plugin was using it. Thanks for the info. Hope you’ll remove the dependency.

    Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi @outcats85,
    Since v4.3.4 our plugin no longer uses jQuery all of our codes have been rewritten in vanilla JS as I hate jQuery as well. But if you check the backend.js code you will see that there are only two placed where jQuery UI library has been used. The reason behind it was as WordPress admin loads jQuery UI library anyways for the admin to work, we didn’t want to increase the resource count to load something else just for us, instead used jQuery UI as it will not increase any extra resource count.
    But honestly, I also want to get rid of the ancient jQuery as much as you want. Unfortunately, the WordPress ecosystem was so much dependent on jQuery for years and the core to be jQUery independent, it will take many years.
    Thanks for the feedback. 🙂

    Thanks a lot for the clarification.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.