• Resolved Generosus

    (@generosus)


    Good Day!

    For the first time, we decided to turn on your plugin’s settings feature: Auto switch to browser language. It triggered the following browser console message:

    Uncaught ReferenceError: jQuery is not defined at (index):71:17177
    (anonymous) @ (index):71

    In addition, it caused a jQuery render-blocking issue in the backend.

    When we deactivate your plugin or turn off the above settings feature, we do not get the above errors.

    Also, if we Async or Defer jQuery, we get a bunch of other errors. If we exclude from deferral the files listed below, the problem still persists.

    /translate_http/_/js
    /translate_a/element.js
    /translate_static/js/element/main.js

    Any idea what’s going on? How can we fix the above condition?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    jQuery is a required library. If you defer the loading of that library without properly taking care of the scripts which rely on it, you will end up having issues.

    If you want to defer execution of js and optimize your website I would recommend to use Cloudflare and turn on their Rocket loader feature, it is also free.

    Thanks! ??

    Thread Starter Generosus

    (@generosus)

    Hi @edo888,

    Thanks for your quick reply.

    We are experiencing the issue with jQuery both deferred and non-deferred. It only happens when we activate your plugin’s “Auto Switch” feature.

    Also, we use Cloudflare. Railgun is a no-no for us (and many others). It causes FOUC on our site.

    Not a biggie, but thought I’d let you know.

    Cheers!

    Plugin Author edo888

    (@edo888)

    Hi,

    I cannot comment further without seeing it in action.

    I have mentioned about Rocket loader, not sure why you refer to Railgun, which is completely different product. And probably if you use multiple optimizers in parallel you may expect issues.

    Thanks! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Auto Switch Triggers jQuery Console Error’ is closed to new replies.