Title: Uncaught reference
Last modified: December 29, 2023

---

# Uncaught reference

 *  Resolved [yoteman](https://wordpress.org/support/users/yoteman/)
 * (@yoteman)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/uncaught-reference-2/)
 * Hi,
 * I have an error in console:
 * Uncaught ReferenceError: jQuery is not defined at autoptimize_single_6968716a23506e4ea1461997dcd27531.
   php:1:9899
 * How can I fix it?
 * Thanks
    -  This topic was modified 2 years, 3 months ago by [yoteman](https://wordpress.org/support/users/yoteman/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-reference-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/uncaught-reference-2/#post-17306818)
 * hard to say; it looks like you’re also running mod_pagespeed which is also trying
   to optimize the JavaScript. can you (at least temporarily) disable pagespeed 
   so we can see what is happening without it?
 * frank
 *  Thread Starter [yoteman](https://wordpress.org/support/users/yoteman/)
 * (@yoteman)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/uncaught-reference-2/#post-17308944)
 * I’ve deactivated all server side optimization but Stack cache, is in-built plugin.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/uncaught-reference-2/#post-17308990)
 * OK, that seems to have fixed the issue (I don’t see `Uncaught ReferenceError:
   jQuery is not defined` any more?
 *  Thread Starter [yoteman](https://wordpress.org/support/users/yoteman/)
 * (@yoteman)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/uncaught-reference-2/#post-17308999)
 * I just reactivated optimization and cache, and now two errors appears:
 * Uncaught ReferenceError: jQuery is not defined at autoptimize_single_6968716a23506e4ea1461997dcd27531.
   php:1:9899
 * Uncaught ReferenceError: astraAddon is not defined at accountMenuToggle (autoptimize_single_6968716a23506e4ea1461997dcd27531.
   php:1:3277) at autoptimize_single_6968716a23506e4ea1461997dcd27531.php:1:4382
    -  This reply was modified 2 years, 3 months ago by [yoteman](https://wordpress.org/support/users/yoteman/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/uncaught-reference-2/#post-17309044)
 * the root cause here is that you have 2 optimization solutions that are both trying
   to optimize the javascript, this indeed can lead to such errors yoteman, I would
   suggest to use only one such solution (so having JS optimized by Autoptimize 
   OR by mod_pagespeed).
 * Page caching obviously you can (and should) keep active 🙂
 *  Thread Starter [yoteman](https://wordpress.org/support/users/yoteman/)
 * (@yoteman)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/uncaught-reference-2/#post-17309264)
 * Yes, you’re right.
 * Thanks for the support 🙂
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/uncaught-reference-2/#post-17309287)
 * you’re welcome, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂

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

The topic ‘Uncaught reference’ 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/)

 * 7 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/uncaught-reference-2/#post-17309287)
 * Status: resolved