Title: Uncaught TypeError
Last modified: July 14, 2026

---

# Uncaught TypeError

 *  Resolved [dmncvs](https://wordpress.org/support/users/dmncvs/)
 * (@dmncvs)
 * [4 weeks ago](https://wordpress.org/support/topic/uncaught-typeerror-100/)
 * Hi,
 * I’m running PixelYourSite Free 11.2.0.7 on a WooCommerce store (duck.rs), and
   I’m seeing a consistent JavaScript error when customers click “Add to Cart” on
   the single product page for variable products (color/size selection).
 * Error:
   Uncaught TypeError: Cannot read properties of undefined (reading ‘find’)
   at Object.onWooAddToCartOnSingleEvent (public.js?ver=11.2.0.7:3056:49)at HTMLButtonElement.(
   public.js?ver=11.2.0.7:3529:25)
 * This happens on every add-to-cart attempt for variable products and appears to
   block/interfere with the add-to-cart action, based on session recordings showing
   repeated rage-clicks on the button at the moment of the error.
 * Looking at the public.js source, I believe the root cause is a mismatch in function
   signatures for onWooAddToCartOnSingleEvent between different pixel modules:
    - Pinterest/Bing dummy implementations use 5 parameters:
      function (product_id,
      qty, is_variable, is_external, $form)
    - Facebook/GA implementations use 4 parameters:
      function (product_id, qty, product_type,
      $form)
 * If the click handler (around line 3529) invokes this function using the 5-argument
   order, then for the Facebook/GA implementations, the $form parameter actually
   receives the 5th argument (e.g. is_external) instead of the real jQuery form 
   object. This makes $form undefined, so the call to $form.find(‘input[name=”variation_id”]’)
   throws the TypeError above.
 * Happy to provide any additional information if useful for debugging.
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-typeerror-100%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [ehamati](https://wordpress.org/support/users/ehamati/)
 * (@ehamati)
 * [3 weeks, 6 days ago](https://wordpress.org/support/topic/uncaught-typeerror-100/#post-18965522)
 * Hi [@dmncvs](https://wordpress.org/support/users/dmncvs/), you’re using an outdated
   version of the plugin. We recently released a new version, 11.2.1, which fixes
   the uncaught TypeError you reported. Please update the plugin and check it out;
   it should work fine.
    -  This reply was modified 3 weeks, 6 days ago by [ehamati](https://wordpress.org/support/users/ehamati/).
 *  Thread Starter [dmncvs](https://wordpress.org/support/users/dmncvs/)
 * (@dmncvs)
 * [3 weeks, 5 days ago](https://wordpress.org/support/topic/uncaught-typeerror-100/#post-18966028)
 *     ```wp-block-code
       Hi,Thanks for the quick reply and for the fix in 11.2.1.I've updated and confirmed the Facebook/GA signature mismatch is resolved. However, the same error still occurs on variable products — same message, now at public.js?ver=11.2.1:3229:49.Looking at the updated source, the fix wasn't applied to the GTM module. The click handler calls:GTM.onWooAddToCartOnSingleEvent(product_id, qty, product_type, $form); // 4 argumentsBut the GTM implementation is defined as:onWooAddToCartOnSingleEvent: function (product_id, qty, product_type, is_external, $form, prod_info) // 6 parametersSo the 4th argument (the real $form) is received as is_external, and $form is undefined inside the function. This then throws on:if (product_type === Utils.PRODUCT_VARIABLE && !options.gtm.wooVariableAsSimple) {product_id = parseInt($form.find('input[name="variation_id"]').val());}Same root cause as before, just in the GTM module instead of Facebook/GA. Could you check this one too?Thanks again for looking into it.
       ```
   
 *  Thread Starter [dmncvs](https://wordpress.org/support/users/dmncvs/)
 * (@dmncvs)
 * [3 weeks, 4 days ago](https://wordpress.org/support/topic/uncaught-typeerror-100/#post-18967285)
 * Hi,
 * Thanks for maintaining the free version of the plugin — really appreciate it.
 * Just a small follow-up: the GTM issue from my previous message still seems to
   be there in 11.2.1.
 * Also, I came across another error while testing, this time on “remove from cart”:
 * Uncaught TypeError: Pinterest.tag is not a function
   at Object.fireEventForAllPixel(
   public.js?ver=11.2.1:564:53)
 * Might be worth a quick look at the fallback objects in public.js (dummyPinterest/
   dummyBing) — one of the other fallback objects has a tag() method defined, so
   it looks like it might just be missing there.
 * Thanks again for all the work on the plugin!
 *  [ehamati](https://wordpress.org/support/users/ehamati/)
 * (@ehamati)
 * [3 weeks, 1 day ago](https://wordpress.org/support/topic/uncaught-typeerror-100/#post-18969670)
 * You’re right about it. I’ve already asked the developers to investigate and fix
   it shortly.
 *  Thread Starter [dmncvs](https://wordpress.org/support/users/dmncvs/)
 * (@dmncvs)
 * [1 week, 3 days ago](https://wordpress.org/support/topic/uncaught-typeerror-100/#post-18981219)
 * Hi! Thank you very much, 
   add-to-cart now goes smooth, but “remove-from-cart”
   still fires in console with
 * Uncaught TypeError: Pinterest.tag is not a function
   at Object.fireEventForAllPixel(
   public.js?ver=11.2.1:564:53)
 *  [ehamati](https://wordpress.org/support/users/ehamati/)
 * (@ehamati)
 * [1 week, 2 days ago](https://wordpress.org/support/topic/uncaught-typeerror-100/#post-18981477)
 * You’re welcome. We’re checking on this and the fix will be released soon.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-typeerror-100%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/pixelyoursite/assets/icon-256x256.jpg?rev=3178123)
 * [PixelYourSite - Your smart PIXEL (TAG) & API Manager](https://wordpress.org/plugins/pixelyoursite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pixelyoursite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pixelyoursite/)
 * [Active Topics](https://wordpress.org/support/plugin/pixelyoursite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pixelyoursite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pixelyoursite/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [ehamati](https://wordpress.org/support/users/ehamati/)
 * Last activity: [1 week, 2 days ago](https://wordpress.org/support/topic/uncaught-typeerror-100/#post-18981477)
 * Status: resolved