Title: Javascript Error: Uncaught ReferenceError: Colcade is not defined
Last modified: April 28, 2025

---

# Javascript Error: Uncaught ReferenceError: Colcade is not defined

 *  Resolved [viablethought](https://wordpress.org/support/users/viablethought/)
 * (@viablethought)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/javascript-error-uncaught-referenceerror-colcade-is-not-defined/)
 * Hello –
 * The following error is showing in console and it is preventing other scripts 
   from executing on our site:
   Uncaught ReferenceError: Colcade is not definedLine
   1887 in frontend.js
 *     ```wp-block-code
       function crResizeAllGridItems() {if ( ! typeof jQuery.fn.colcade === "function" || typeof jQuery.fn.colcade === "undefined" ) {    Colcade.makeJQueryPlugin();}    crResizeAllGridItemsUtil( jQuery(".cr-reviews-grid-inner") );}
       ```
   
 * Both WordPress and WooCommerce is at the latest versions and running on PHP 8.2
   
   Thanks

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

 *  Plugin Support [pistachio6321](https://wordpress.org/support/users/pistachio6321/)
 * (@pistachio6321)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/javascript-error-uncaught-referenceerror-colcade-is-not-defined/#post-18439535)
 * Thank you for reaching out and reporting this issue!
 * Could you share a link to the page with this error?
 *  Thread Starter [viablethought](https://wordpress.org/support/users/viablethought/)
 * (@viablethought)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/javascript-error-uncaught-referenceerror-colcade-is-not-defined/#post-18439553)
 * Hello [@pistachio6321](https://wordpress.org/support/users/pistachio6321/)
 * I just patched it in our client’s child theme using the following code:
 *     ```wp-block-code
       function load_colcade_for_reviews_plugin() {    wp_enqueue_script(        'colcade',        'https://unpkg.com/colcade@0/colcade.js',        array(),        null,        true    );}add_action('wp_enqueue_scripts', 'load_colcade_for_reviews_plugin', 5);
       ```
   
 * It was causing a conflict with Google Recaptcha and preventing forms from submitting,
   so we needed to patch it quickly. 
   Here is a summary:
 * **Problem Details:**
    - The plugin’s frontend JavaScript calls `Colcade.makeJQueryPlugin()` without
      first checking if the Colcade library is loaded.
    - This happens even on pages where there are **no review grids** or **no shortcodes**
      present.
    - As a result, this breaks JavaScript execution globally, even on non-product
      pages like the homepage, cart, checkout, etc.
 * **Root Cause:**
    - The plugin’s JavaScript file assumes that `Colcade` will always be available.
    - However, `Colcade` is only needed when a review grid (e.g., `[cusrev_reviews_grid]`
      shortcode) is actually displayed.
    - No conditional loading or existence check is done before calling Colcade methods.
 * **Temporary Workaround:**
    - To prevent JS errors and broken functionality, we had to manually enqueue 
      the Colcade library sitewide via our child theme’s `functions.php`.
    - However, this is not ideal because it loads an unnecessary asset on every 
      page, negatively impacting performance.
 * **Recommended Fix:**
    - Before calling `Colcade.makeJQueryPlugin()`, the plugin should first:
       * Check if `Colcade` is defined (`if ( typeof Colcade !== "undefined" )`).
       * Only attempt to initialize Colcade when there is a `.cr-reviews-grid-inner`
         element present in the DOM.
    - Alternatively, conditionally load Colcade only on pages where it is actually
      needed (where the shortcode or widget is used).
 * This would ensure better performance, avoid unnecessary errors, and reduce resource
   loading on unrelated pages.
   Thanks
 *  Plugin Support [pistachio6321](https://wordpress.org/support/users/pistachio6321/)
 * (@pistachio6321)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/javascript-error-uncaught-referenceerror-colcade-is-not-defined/#post-18439763)
 * Thank you for sharing the additional details. This issue should be resolved in
   the version 5.76.2. Please install the update and let us know in case of any 
   further issues.
 *  Thread Starter [viablethought](https://wordpress.org/support/users/viablethought/)
 * (@viablethought)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/javascript-error-uncaught-referenceerror-colcade-is-not-defined/#post-18442311)
 * [@pistachio6321](https://wordpress.org/support/users/pistachio6321/) –
 * Thank you for your quick response and attention to this issue, we have updated
   our client’s site and the new version does resolve this particular issue.
 * Have a great day!

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

The topic ‘Javascript Error: Uncaught ReferenceError: Colcade is not defined’ is
closed to new replies.

 * ![](https://ps.w.org/customer-reviews-woocommerce/assets/icon-256x256.png?rev
   =2532349)
 * [Customer Reviews for WooCommerce](https://wordpress.org/plugins/customer-reviews-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/customer-reviews-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/customer-reviews-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/customer-reviews-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/customer-reviews-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/customer-reviews-woocommerce/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [viablethought](https://wordpress.org/support/users/viablethought/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/javascript-error-uncaught-referenceerror-colcade-is-not-defined/#post-18442311)
 * Status: resolved