Title: JavaScript errors
Last modified: July 8, 2019

---

# JavaScript errors

 *  Resolved [mookie4a4](https://wordpress.org/support/users/mookie4a4/)
 * (@mookie4a4)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/javascript-errors-42/)
 * Since the update to 2.2 this plugin produces a few JS errors:
    Uncaught ReferenceError:_
   is not defined (index):221 Uncaught ReferenceError: moment is not defined (index):
   221 Uncaught ReferenceError: wp is not defined (index):221 Uncaught ReferenceError:
   wp is not defined (index):221 Uncaught ReferenceError: wp is not defined (index):
   221 Uncaught ReferenceError: wp is not defined (index):221 Uncaught ReferenceError:
   wp is not defined (index):221 Uncaught ReferenceError: wp is not defined
 * When using JS combine and load plugins like Autoptimize then all the product 
   images fail to display due to the JS errors within the combined file.

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

 *  [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/javascript-errors-42/#post-11710293)
 * you can try adding `js/dist` to Autoptimize’s comma-separated JS optimization
   exclusion list mookie404, but do take into account that this probably implies
   that woocommerce blocks is adding a ton of JS for front-end rendering and doing
   so will have a significant impact (with and without AO).
 * hope this helps,
    frank (ao dev)
 *  Thread Starter [mookie4a4](https://wordpress.org/support/users/mookie4a4/)
 * (@mookie4a4)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/javascript-errors-42/#post-11710463)
 * Thanks for the tip! I’m not sure if I want to sacrifice my sites good page score
   just for this plugin. I’ll run some tests with this.
 * Cheers!
 *  Plugin Author [Albert Juhé Lluveras](https://wordpress.org/support/users/aljullu/)
 * (@aljullu)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/javascript-errors-42/#post-11745291)
 * Thanks for the report [@mookie4a4](https://wordpress.org/support/users/mookie4a4/)!
   Was your error appearing in the front-end of your site or in wp-admin?
 * Notice in a future version of WooCommerce Blocks it will only load scripts in
   the frontend when there is a block that requires them, so there shouldn’t be 
   any impact in your site page score if you only use blocks that don’t require 
   frontend scripts.
 *  Thread Starter [mookie4a4](https://wordpress.org/support/users/mookie4a4/)
 * (@mookie4a4)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/javascript-errors-42/#post-11745928)
 * Just the front-end, I rolled back to the previous version. What changed or was
   added to cause the sudden JS errors? There must be some JS conflicts or load 
   issues because I couldn’t get your plugin to work with any of the most popular
   JS combine/optimise plugins.
 * Hope that helps!

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

The topic ‘JavaScript errors’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woo-gutenberg-products-block_71608f.
   svg)
 * [WooCommerce Blocks](https://wordpress.org/plugins/woo-gutenberg-products-block/)
 * [Support Threads](https://wordpress.org/support/plugin/woo-gutenberg-products-block/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-gutenberg-products-block/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-gutenberg-products-block/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-gutenberg-products-block/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [mookie4a4](https://wordpress.org/support/users/mookie4a4/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/javascript-errors-42/#post-11745928)
 * Status: resolved