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

Fields hidden via customizer prevent checkout with error: "Cannot read properties of null (reading 'value')" #7121

Closed
WillBrubaker opened this issue Sep 5, 2023 · 5 comments
Assignees
Labels
Component: International Expansion Issues related to international expansion component: upe priority: critical The issue is critical—e.g. a fatal error, security problem affecting many customers. type: bug The issue is a confirmed bug.

Comments

@WillBrubaker
Copy link

Describe the bug

Since the release of 6.4.0 we're seeing a lot of reports of customer unable to checkout with a WooCommerce error notice that says: Cannot read properties of null (reading 'value')

6758605-zen
6755717-zen
6756312-zen
6759378-zen

https://wordpress.org/support/topic/cannot-read-properties-of-null-reading-value/

To Reproduce

  1. Set the phone field as hidden via the customizer
  2. Try to checkout

Actual behavior

Get an error message

Screenshots

O2NTYr.png

Expected behavior

To be able to checkout.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

`

WordPress Environment

WordPress address (URL): https://wcpaysubsclone.local
Site address (URL): https://wcpaysubsclone.local
WC Version: 8.0.3
REST API Version: ✔ 8.0.3
WC Blocks Version: ✔ 10.6.6
Action Scheduler Version: ✔ 3.6.1
Log Directory Writable: ✔
WP Version: 6.3.1
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: ✔
WP Cron: ✔
Language: en_US
External object cache: –

Server Environment

Server Info: nginx/1.16.0
PHP Version: 8.1.9
PHP Post Max Size: 1,000 MB
PHP Time Limit: 1200
PHP Max Input Vars: 4000
cURL Version: 7.84.0
(SecureTransport) OpenSSL/1.1.1q

SUHOSIN Installed: –
MySQL Version: 8.0.16
Max Upload Size: 300 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Database

WC Database Version: 8.0.3
WC Database Prefix: wp_
Total Database Size: 8.54MB
Database Data Size: 6.74MB
Database Index Size: 1.80MB
wp_woocommerce_sessions: Data: 1.47MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_actions: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_options: Data: 4.03MB + Index: 0.06MB + Engine InnoDB
wp_postmeta: Data: 0.14MB + Index: 0.13MB + Engine InnoDB
wp_posts: Data: 0.06MB + Index: 0.06MB + Engine InnoDB
wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_usermeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_admin_note_actions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
wp_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
wp_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB

Post Type Counts

attachment: 18
customize_changeset: 1
page: 7
post: 2
product: 10
product_variation: 9
revision: 4
shop_order: 9
shop_subscription: 2

Security

Secure connection (HTTPS): ✔
Hide errors from visitors: ✔

Active Plugins (3)

WooCommerce Payments Dev Tools: by Automattic –
WooCommerce Payments: by Automattic – 6.4.0
WooCommerce: by Automattic – 8.0.3

Inactive Plugins (4)

Jetpack: by Automattic – 12.5
Testing various code snippets: by Will Brubaker – 1.0
WooCommerce Shipping & Tax: by WooCommerce – 2.3.3
WooCommerce USPS Shipping: by WooCommerce – 4.7.3

Must Use Plugins (1)

My Muplugin: by Ghost in the machine – 1.0

Settings

API Enabled: –
Force SSL: –
Currency: USD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
subscription (subscription)
variable (variable)
variable subscription (variable-subscription)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)

Connected to WooCommerce.com: –
Enforce Approved Product Download Directories: ✔
HPOS feature screen enabled: –
HPOS feature enabled: –
Order datastore: WC_Order_Data_Store_CPT
HPOS data sync enabled: –

WC Pages

Shop base: #7 - /shop/
Cart: #8 - /cart/
Checkout: #9 - /checkout/
My account: #10 - /my-account/
Terms and conditions: ❌ Page visibility should be public

Theme

Name: Astra
Version: 4.3.1
Author URL: https://wpastra.com/about/?utm_source=theme_preview&utm_medium=author_link&utm_campaign=astra_theme
Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
WooCommerce Support: ✔

Templates

Overrides: –

Subscriptions

WCS_DEBUG: ✔ No
Subscriptions Mode: ❌ Staging
Subscriptions Live URL: https://bz8pgt5e8.jurassic.tube
Subscriptions-core Library Version: 6.0.0
Subscription Statuses: wc-active: 2
WooCommerce Account Connected: ❌ No

Store Setup

Country / State: United States (US) — West Virginia

Subscriptions by Payment Gateway

WooPayments: wc-active: 2

Payment Gateway Support

WooPayments: products
refunds
multiple_subscriptions
subscription_cancellation
subscription_payment_method_change_admin
subscription_payment_method_change_customer
subscription_payment_method_change
subscription_reactivation
subscription_suspension
subscriptions
gateway_scheduled_payments
tokenization
add_payment_method

WooPayments (giropay): products
refunds
multiple_subscriptions
subscription_cancellation
subscription_payment_method_change_admin
subscription_payment_method_change_customer
subscription_payment_method_change
subscription_reactivation
subscription_suspension
subscriptions
gateway_scheduled_payments
tokenization
add_payment_method

Admin

Enabled Features: activity-panels
analytics
product-block-editor
coupons
core-profiler
customer-effort-score-tracks
import-products-task
experimental-fashion-sample-products
shipping-smart-defaults
shipping-setting-tour
homescreen
marketing
mobile-app-banner
navigation
onboarding
onboarding-tasks
remote-inbox-notifications
remote-free-extensions
payment-gateway-suggestions
shipping-label-banner
subscriptions
store-alerts
transient-notices
woo-mobile-welcome
wc-pay-promotion
wc-pay-welcome-page

Disabled Features: minified-js
new-product-management-experience
product-variation-management
settings
async-product-editor-category-field

Daily Cron: ✔ Next scheduled: 2023-09-05 22:04:36 +00:00
Options: ✔
Notes: 80
Onboarding: skipped

WooCommerce Payments

Version: 6.4.0
Connected to WPCOM: Yes
Blog ID: 215909460
Account ID: acct_1MeS4NCHKye7fU3X

Action Scheduler

Canceled: 1
Oldest: 2023-09-05 00:01:05 +0000
Newest: 2023-09-05 00:01:05 +0000

Complete: 33
Oldest: 2023-08-25 02:09:32 +0000
Newest: 2023-09-05 00:01:13 +0000

Failed: 3
Oldest: 2022-12-14 22:08:25 +0000
Newest: 2023-03-22 04:28:29 +0000

Pending: 1
Oldest: 2023-09-06 00:01:06 +0000
Newest: 2023-09-06 00:01:06 +0000

Status report information

Generated at: 2023-09-05 00:12:53 +00:00
`

@WillBrubaker WillBrubaker added the type: bug The issue is a confirmed bug. label Sep 5, 2023
@Brianmitchtay
Copy link

I can likewise reproduce this if the Address line 2 field is hidden.

@csmcneill
Copy link
Contributor

I can reliably reproduce this on one of my sites. I am unable to reproduce it on another.

On the site where I can reproduce this, there are a few workarounds:

  1. Disabling UPE.
  2. Using the checkout block instead of the shortcode.
  3. Not marking optional fields as Hidden via the customizer.
  4. Reverting to 6.3.2.

It's possible that 007e647 could be at play here as it's the only change I can see in 6.4.0 that impacts the phone input on checkout (cc @dpaun1985).

@csmcneill csmcneill added priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. component: upe Component: International Expansion Issues related to international expansion labels Sep 5, 2023
@csmcneill csmcneill changed the title Can't checkout w/ error notice "Cannot read properties of null (reading 'value')" Fields hidden via customizer prevent checkout with error: "Cannot read properties of null (reading 'value')" Sep 5, 2023
@dpaun1985
Copy link
Contributor

@csmcneill, I checked and the commit shouldn't generate this kind of error.

@frosso
Copy link
Contributor

frosso commented Sep 5, 2023

Taking a quick look

@naman03malhotra naman03malhotra added priority: critical The issue is critical—e.g. a fatal error, security problem affecting many customers. and removed priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. labels Sep 5, 2023
@frosso frosso self-assigned this Sep 5, 2023
@frosso
Copy link
Contributor

frosso commented Sep 5, 2023

Fixed by #7130

@frosso frosso closed this as completed Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: International Expansion Issues related to international expansion component: upe priority: critical The issue is critical—e.g. a fatal error, security problem affecting many customers. type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

6 participants