Title: JS error on plugin activation
Last modified: August 30, 2016

---

# JS error on plugin activation

 *  Resolved [Dmitry_Demir](https://wordpress.org/support/users/dmitry_demir/)
 * (@dmitry_demir)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/js-error-on-plugin-activation/)
 * When this plugin is active, I get the following error on my front pages:
    “Uncaught
   TypeError: Cannot read property ‘length’ of undefined” in jquery.js?ver=1.11.3
 * No idea what’s causing it, but it disappears as soon as I deactivate this plugin.
 * [https://wordpress.org/plugins/easy-taxonomy-images/](https://wordpress.org/plugins/easy-taxonomy-images/)

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

 *  Thread Starter [Dmitry_Demir](https://wordpress.org/support/users/dmitry_demir/)
 * (@dmitry_demir)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/js-error-on-plugin-activation/#post-6809918)
 * By the way, I’m making a custom theme that is based on this one: [https://wordpress.org/themes/blankslate/](https://wordpress.org/themes/blankslate/)
 * I also removed all the unneeded files (mostly CSS and JS), so maybe this plugin
   depends on some excluded JS?
 *  Thread Starter [Dmitry_Demir](https://wordpress.org/support/users/dmitry_demir/)
 * (@dmitry_demir)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/js-error-on-plugin-activation/#post-6809988)
 * There seems to be some conflict with another plugin: Smart Variations Images (
   [https://wordpress.org/plugins/smart-variations-images/](https://wordpress.org/plugins/smart-variations-images/))
 * The error occurs only when both plugins are active.
 *  Plugin Author [wpdevstudio](https://wordpress.org/support/users/wpdevstudio/)
 * (@wpdevstudio)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/js-error-on-plugin-activation/#post-6810028)
 * The error comes in frontend ?
 *  Thread Starter [Dmitry_Demir](https://wordpress.org/support/users/dmitry_demir/)
 * (@dmitry_demir)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/js-error-on-plugin-activation/#post-6810035)
 * Yes, and while the error is triggered by Smart Variations Images plugin, the 
   reason seems to be in this plugin, because when it’s active it somehow messes
   up the variations add-to-cart form, the markup there is wrong… The quotes inside
   of a data-product_variations attribute turn from " into ” (isn’t esc_attr made
   to prevent this? It is used on this attribute’s value in variable.php…) and that
   causes the mess in html, which in turn breaks the form and so the add-to-cart
   functionality doesn’t work properly (and then the JS error comes).
 * I’ve tried it with Storefront theme and the result is the same, so it looks like
   it doesn’t have to do with my theme… I’ll write here if I manage to find the 
   reason and the solution, but I’m quite puzzled at the moment.
 *  Thread Starter [Dmitry_Demir](https://wordpress.org/support/users/dmitry_demir/)
 * (@dmitry_demir)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/js-error-on-plugin-activation/#post-6810036)
 * If I comment out this line
    `add_filter("attribute_escape", array($this,"change_insert_button_text"),
   10, 2);` The problem disappears. Can you tell me what exactly is this function
   used for?
 *  Thread Starter [Dmitry_Demir](https://wordpress.org/support/users/dmitry_demir/)
 * (@dmitry_demir)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/js-error-on-plugin-activation/#post-6810039)
 * By the way, attribute_escape seems to be deprecated.
 *  Plugin Author [wpdevstudio](https://wordpress.org/support/users/wpdevstudio/)
 * (@wpdevstudio)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/js-error-on-plugin-activation/#post-6810068)
 * fixed this in latest version . please pull updates
 * Thanks
 *  Thread Starter [Dmitry_Demir](https://wordpress.org/support/users/dmitry_demir/)
 * (@dmitry_demir)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/js-error-on-plugin-activation/#post-6810083)
 * Thanks for informing!

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

The topic ‘JS error on plugin activation’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/easy-taxonomy-images_332c35.svg)
 * [Easy Taxonomy Images](https://wordpress.org/plugins/easy-taxonomy-images/)
 * [Support Threads](https://wordpress.org/support/plugin/easy-taxonomy-images/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-taxonomy-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-taxonomy-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-taxonomy-images/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Dmitry_Demir](https://wordpress.org/support/users/dmitry_demir/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/js-error-on-plugin-activation/#post-6810083)
 * Status: resolved