Title: Error with elementor when activating the plugin
Last modified: August 3, 2022

---

# Error with elementor when activating the plugin

 *  Resolved [seniordeemos](https://wordpress.org/support/users/seniordeemos/)
 * (@seniordeemos)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/)
 * 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](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885448)
 * You’ll have to make sure jQuery is not asynced/ deferred seniordeemos. Can you
   do so and then re-test?
 *  Thread Starter [seniordeemos](https://wordpress.org/support/users/seniordeemos/)
 * (@seniordeemos)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885456)
 * 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](https://wordpress.org/support/users/seniordeemos/)
 * (@seniordeemos)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885459)
 * How can i make jquery not to defer or async,
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885469)
 * Settings -> Async JavaScript -> Settings -> jQuery -> make sure it is set to “
   exclude”
 * ![](https://i0.wp.com/i.imgur.com/pHVWqX6.png?ssl=1)
 *  Thread Starter [seniordeemos](https://wordpress.org/support/users/seniordeemos/)
 * (@seniordeemos)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885472)
 * 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](https://wordpress.org/support/users/seniordeemos/)
 * (@seniordeemos)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885477)
 * 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](https://wordpress.org/support/users/seniordeemos/)
 * (@seniordeemos)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885478)
 * Thta’s the website if you wanna take a look [https://lavracaccidentlaw.com/](https://lavracaccidentlaw.com/)
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885481)
 * OK, can you try adding `wp-includes/js` to the AsyncJS exclusion list?
 *  Thread Starter [seniordeemos](https://wordpress.org/support/users/seniordeemos/)
 * (@seniordeemos)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885500)
 * i added this wp-includes/js to Async Javascript plugin under “Script Exclusion”
   but still the same problem
 *  Thread Starter [seniordeemos](https://wordpress.org/support/users/seniordeemos/)
 * (@seniordeemos)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885656)
 * i found the problem is that when i tried to defer the whole javascript everything
   worked fine
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885730)
 * > 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](https://wordpress.org/support/users/seniordeemos/)
 * (@seniordeemos)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885741)
 * 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](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885761)
 * > 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](https://wordpress.org/support/users/seniordeemos/)
 * (@seniordeemos)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885787)
 * So one last question , when this will take effect on GTmetrics Analysis ?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885798)
 * 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.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 15 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/error-with-elementor-when-activating-the-plugin/#post-15885798)
 * Status: resolved