Title: JavaScript error &#8211; can&#8217;t save settings
Last modified: November 30, 2021

---

# JavaScript error – can’t save settings

 *  [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/javascript-error-cant-save-settings/)
 * When making any setting changes or clicking the Save button on the plugin’s setting
   page, I get the following error in the browser console:
 *     ```
       admin.js?ver=2.1.2:391 Uncaught TypeError: Cannot read properties of undefined (reading 'send')
           at updateMainTriggerEle (admin.js?ver=2.1.2:391)
           at HTMLInputElement.<anonymous> (admin.js?ver=2.1.2:356)
           at HTMLInputElement.dispatch (jquery.min.js?ver=3.6.0:2)
           at HTMLInputElement.v.handle (jquery.min.js?ver=3.6.0:2)
       ```
   
 * I’ve reinstalled the plugin to make sure nothing’s missing.

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

 *  Thread Starter [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/javascript-error-cant-save-settings/#post-15119585)
 * Forgot to mention that this is a new installation of the plugin on a test site
   for a site that runs the previous version successfully. I was testing the update
   after reading about some issues with the latest release, and pow!
 *  Plugin Author [Woosuite](https://wordpress.org/support/users/themealien/)
 * (@themealien)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/javascript-error-cant-save-settings/#post-15166217)
 * Hi Gal,
 * Sorry to hear you are experiencing issues.
 * The problem is we are using wp.ajax.send to make the ajax call
 * The wp.ajax object is defined in the wp-includes/js/wp-util.js, it is called 
   by default by WordPress
 * Wordpress Utils JS file is not loaded properly so it caused the error and you
   can check to see if that file is loaded within your admin side?
 *  Thread Starter [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/javascript-error-cant-save-settings/#post-15167993)
 * After not getting a reply, I decided to update the plugin on the live site and
   see what happens, and it seems OK.
 * Looking at the admin page code, the test site really isn’t loading wp-utils.js,
   while the live site does.
 * What would cause that?
 *  [1stwebdesigns](https://wordpress.org/support/users/1stwebdesigns/)
 * (@1stwebdesigns)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/javascript-error-cant-save-settings/#post-15243765)
 * I am also facing this issue
 *  [1stwebdesigns](https://wordpress.org/support/users/1stwebdesigns/)
 * (@1stwebdesigns)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/javascript-error-cant-save-settings/#post-15243800)
 * We have the plugin “Disable Woocommerce Bloat” installed. I temporarily disabled
   this plugin and now the save feature works.
 *  Plugin Author [Woosuite](https://wordpress.org/support/users/themealien/)
 * (@themealien)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/javascript-error-cant-save-settings/#post-15246658)
 * [@galbaras](https://wordpress.org/support/users/galbaras/) honestly, we couldn’t
   say without recreating your test environment. It could be anything.
 * [@1stwebdesigns](https://wordpress.org/support/users/1stwebdesigns/) we will 
   try to create your issue using Disable Woocommerce Bloat and look into a different
   way of saving the setting,

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

The topic ‘JavaScript error – can’t save settings’ is closed to new replies.

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

 * 6 replies
 * 3 participants
 * Last reply from: [Woosuite](https://wordpress.org/support/users/themealien/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/javascript-error-cant-save-settings/#post-15246658)
 * Status: not resolved