Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read properties of undefined (reading 'map') at actions.js #341

Closed
opr opened this issue Dec 21, 2023 · 1 comment · Fixed by #343
Closed

TypeError: Cannot read properties of undefined (reading 'map') at actions.js #341

opr opened this issue Dec 21, 2023 · 1 comment · Fixed by #343
Assignees
Labels
type: bug The issue/PR is a confirmed bug.

Comments

@opr
Copy link

opr commented Dec 21, 2023

Describe the bug:

When running this plugin and using the WooCommerce Cart and Checkout blocks, I see this error in my console.

TypeError: Cannot read properties of undefined (reading 'map')
    at actions.js?ver=2e50f7862892acedba0f:1:740

I believe the related file and line is https://github.com/woocommerce/woocommerce-google-analytics-integration/blob/trunk/assets/js/src/tracking.js#L108

Steps to reproduce:

  1. Set up Google Analytics
  2. Use the Cart/Checkout Blocks
  3. Add items to your cart and go to the Checkout page.
  4. See the error in JS console.

Expected behavior:

No errors.

Actual behavior:

Error mentioned above.

Additional details:

@opr opr added the type: bug The issue/PR is a confirmed bug. label Dec 21, 2023
@eason9487
Copy link
Member

eason9487 commented Dec 26, 2023

In backtracking on this issue, found that this also includes another issue, which is that there is the experimental__woocommerce_blocks-checkout-render-checkout-form event tracking has been lost for over two years. (Ref: woocommerce/woocommerce-blocks#4745)

Since WooCommerce Blocks 10.8.0, which was bundled into Woo 8.1.0, the data structure was changed by woocommerce/woocommerce-blocks#10254. Therefore, this issue also happens on the other four tracking when calling the trackCheckoutStep function.

Since WooCommerce Blocks 11.5.0, which was bundled into Woo 8.4.0, the missing event was added back by woocommerce/woocommerce-blocks#11554, resulting in this issue occurring when entering the checkout page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The issue/PR is a confirmed bug.
Projects
None yet
2 participants