• Resolved seniordeemos

    (@seniordeemos)


    when i try to enable async javascript , i get this messages in the console , and sometimes the website doesn’t load well.

    Uncaught ReferenceError: jQuery is not defined
    at jquery-migrate.min.js?ver=3.3.2:2:1
    (anonymous) @ jquery-migrate.min.js?ver=3.3.2:2

    frontend.min.js?ver=3.6.8:2 Uncaught ReferenceError: elementorFrontendConfig is not defined
        at 59 (frontend.min.js?ver=3.6.8:2:32774)
        at __webpack_require__ (webpack.runtime.min.js?ver=3.6.8:2:153)
        at 5654 (frontend.min.js?ver=3.6.8:2:3722)
        at __webpack_require__ (webpack.runtime.min.js?ver=3.6.8:2:153)
        at frontend.min.js?ver=3.6.8:2:40412
        at __webpack_require__.O (webpack.runtime.min.js?ver=3.6.8:2:499)
        at frontend.min.js?ver=3.6.8:2:40432
        at webpackJsonpCallback (webpack.runtime.min.js?ver=3.6.8:2:4611)
        at frontend.min.js?ver=3.6.8:2:61
Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    You’ll have to make sure jQuery is not asynced/ deferred seniordeemos. Can you do so and then re-test?

    Thread Starter seniordeemos

    (@seniordeemos)

    this happens when i start enabling async javascript plugin, when i turn off the async javascript plugin everything works fine , but the website speed is too slow.

    Thread Starter seniordeemos

    (@seniordeemos)

    How can i make jquery not to defer or async,

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Settings -> Async JavaScript -> Settings -> jQuery -> make sure it is set to “exclude”

    Thread Starter seniordeemos

    (@seniordeemos)

    For you to have a better understanding what is going on.

    Autoptimize Plugin is Activated with this settings:
    javascript.
    Optimize JavaScript Code? Checked
    Do not aggregate but defer? Checked
    ?Also defer inline JS? Checked

    CSS

    Optimize CSS Code? Checked
    all other options unchecked

    Misc Options
    All options are checked.

    Then once i try to enable Async javascript plugin and check on enable async javascript. i got these error

    Thread Starter seniordeemos

    (@seniordeemos)

    i checked that jquery is not defered or asynced i checked on excluded , but still getting these errors ,

    autoptimize_single_1e1f6bda57b3fe634f02092ec0f871e0.js?ver=2.6.3:1 Uncaught TypeError: Cannot read properties of undefined (reading 'hooks')
        at Function.<anonymous> (autoptimize_single_1e1f6bda57b3fe634f02092ec0f871e0.js?ver=2.6.3:1:1637)
        at Function.each (jquery.min.js?ver=3.6.0:2:3053)
        at init (autoptimize_single_1e1f6bda57b3fe634f02092ec0f871e0.js?ver=2.6.3:1:1613)
        at dispatch (jquery.min.js?ver=3.6.0:2:43064)
        at v.handle (jquery.min.js?ver=3.6.0:2:41048)
        at Events.dispatch (frontend.min.js?ver=3.6.8:2:34540)
        at Frontend.init (frontend.min.js?ver=3.6.8:2:8664)
        at HTMLDocument.<anonymous> (frontend.min.js?ver=3.6.8:2:8999)
        at e (jquery.min.js?ver=3.6.0:2:30038)
        at t (jquery.min.js?ver=3.6.0:2:30340)
    Uncaught ReferenceError: _ is not defined
        at wp-util.min.js?ver=6.0.1:2:110
        at wp-util.min.js?ver=6.0.1:2:1297
    (anonymous) @ wp-util.min.js?ver=6.0.1:2
    (anonymous) @ wp-util.min.js?ver=6.0.1:2
    Thread Starter seniordeemos

    (@seniordeemos)

    Thta’s the website if you wanna take a look https://lavracaccidentlaw.com/

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, can you try adding wp-includes/js to the AsyncJS exclusion list?

    Thread Starter seniordeemos

    (@seniordeemos)

    i added this wp-includes/js to Async Javascript plugin under “Script Exclusion” but still the same problem

    Thread Starter seniordeemos

    (@seniordeemos)

    i found the problem is that when i tried to defer the whole javascript everything worked fine

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    i added this wp-includes/js to Async Javascript plugin under “Script Exclusion” but still the same problem

    what JS error do you see on the browser console in that case?

    Thread Starter seniordeemos

    (@seniordeemos)

    no JS Errors , it is all Errors like

    `Uncaught ReferenceError: _ is not defined
    at wp-util.min.js?ver=6.0.1:2:110
    at wp-util.min.js?ver=6.0.1:2:1297
    (anonymous) @ wp-util.min.js?ver=6.0.1:2
    (anonymous) @ wp-util.min.js?ver=6.0.1:2`

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Uncaught ReferenceError: _ is not defined

    well, that’s a JS error actually ??

    but what is surprising; _ (underscore) is inside wp-includes/js, so it should be defined if wp-includes/js is excludes from being asynced.

    i found the problem is that when i tried to defer the whole javascript everything worked fine

    you mean switching AsyncJS configuration from async to defer? that would indeed be the better setting.

    Thread Starter seniordeemos

    (@seniordeemos)

    So one last question , when this will take effect on GTmetrics Analysis ?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    If you’re on some plan that does continuous/ regular performance tests then I’m afraid i don’t know, but if you’re referring to standard GTmetrics one-off tests it should show immediately (assuming you cleared and re-popuplated your page cache).

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Error with elementor when activating the plugin’ is closed to new replies.