TypeError: Cannot read properties of undefined (reading ‘split’)
-
Hi team,
I’m encountering a JavaScript error when using the Google Listings & Ads plugin in WooCommerce.
Steps to Reproduce:
- Navigate to Marketing > Google for WooCommerce.
- Create or edit a campaign.
- Go to the “Optimize your campaign” step.
- Click “Select Final URL” and choose the Shop page (/shop/).
- The plugin crashes and shows a white screen with the error message below.
Error Message:
TypeError: Cannot read properties of undefined (reading ‘split’)
File trace shows it originates in:
/wp-content/plugins/google-listings-and-ads/js/build/dashboard.js
… and is also referenced in WooCommerce assets like:
/wp-content/plugins/woocommerce/assets/client/admin/components/index.jsThis only happens when the Shop page is selected.
Diagnostic Info:
- Plugin: Google Listings & Ads version 2.10.1
- WooCommerce: version 9.0.1
- Theme: Reproduced with both custom theme and default WordPress themes
- Site Permalinks: Valid and resaved
- Shop Page: Correctly assigned in WooCommerce > Settings > Products
- Cache: Cleared all browser/site/server/CDN caches
- Cookies: Tested before and after clearing browser cookies
- Console Output: No critical JS errors except this one
- Browser: Chrome latest
The REST API returns this for the Shop page:
[ { “id”: 58, “slug”: “shop”, “link”: “https://nebulasoftware.com/shop/“, “title”: { “rendered”: “Shop” }, … } ]
I’ve also confirmed:
- The Shop page renders correctly in the front end and displays products.
- Console shows no other issues related to the page.
- All plugins are up to date.
- I disabled all other plugins (except WooCommerce and Google Listings & Ads) to isolate the issue, but it still occurs.
Summary:
It looks like your JavaScript is calling
.split()on an undefined variable, likely when parsing a value related to the Shop page. The REST data and slug look valid, so this appears to be a logic bug in the plugin itself.Site URL and System Status report below:
https://nebulasoftware.com System Status Report
### WordPress Environment ### WordPress address (URL): [Redacted] Site address (URL): [Redacted] WC Version: 9.8.1 Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site. Action Scheduler Version: ✔ 3.9.2 Log Directory Writable: ✔ WP Version: 6.7.2 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ✔ Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 8.2.28 PHP Post Max Size: 300 MB PHP Time Limit: 500 PHP Max Input Vars: 3000 cURL Version: 8.12.1 OpenSSL/3.3.3 SUHOSIN Installed: – MySQL Version: 8.0.33-25 Max Upload Size: 64 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### [REDACTED] ### Post Type Counts ### attachment: 46 custom_css: 3 mgmlp_media_folder: 14 nav_menu_item: 13 page: 28 post: 1 product: 7 revision: 1 wp_font_face: 36 wp_font_family: 12 wp_global_styles: 5 wp_navigation: 2 wp_template_part: 2 wpcode: 2 wpforms: 3 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (26) ### CoBlocks: by GoDaddy – 3.1.15 Customizer Export/Import: by The Beaver Builder Team – 0.9.8 Enable Media Replace: by ShortPixel – 4.1.6 File Renaming on upload: by WPFactory – 2.6.4 Flush All Caches: by Nebula Software – 2.6 Google for WooCommerce: by WooCommerce – 2.9.10 IndexNow: by Microsoft Bing – 1.0.3 Media Cleaner (Pro): by Jordy Meow – 6.8.7 Regenerate Thumbnails Advanced PRO: by ShortPixel – 1.0.0 Regenerate Thumbnails Advanced: by ShortPixel – 2.5.0 ShortPixel Image Optimizer: by ShortPixel - Convert WebP/AVIF & Optimize Images – 6.1.4 WooCommerce.com Update Manager: by Automattic – 1.0.3 WooPayments: by WooCommerce – 9.2.0 WooCommerce Shipping & Tax: by WooCommerce – 2.8.9 WooCommerce Shipping: by WooCommerce – 1.6.4 WooCommerce Subscriptions: by WooCommerce – 7.3.1 WooCommerce: by Automattic – 9.8.1 Yoast SEO Premium: by Team Yoast – 24.8 Yoast SEO: by Team Yoast – 24.8.1 WP Rocket: by WP Media – 3.18.3 WP User Profile Avatar: by WP Event Manager – 1.0.6 WPForms Geolocation: by WPForms – 2.11.0 WPForms Mailchimp: by WPForms – 2.4.0 WPForms User Journey: by WPForms – 1.4.0 WPForms: by WPForms – 1.9.4.2 Yoast SEO: WooCommerce: by Team Yoast – 16.5 ### Inactive Plugins (0) ### ### Dropin Plugins () ### advanced-cache.php: advanced-cache.php db-error.php: db-error.php object-cache.php: object-cache.php ### Must Use Plugins (3) ### Object Cache Pro (MU): by Rhubarb Group – 1.21.2 SSO: by Garth Mortensen Mike Hansen – 0.5 System Plugin: by – 4.165.0 ### Settings ### Legacy 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 enabled: ✔ Order datastore: GoDaddy\WordPress\MWC\Core\Features\Commerce\Orders\WooCommerce\OrderDataStore HPOS data sync enabled: ✔ ### Logging ### Enabled: ✔ Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2 Retention period: 7 days Level threshold: – Log directory size: 123 KB ### WC Pages ### Shop base: #58 - /shop/ Cart: #77 - /cart/ - Contains the woocommerce_cart shortcode Checkout: #76 - /checkout/ - Contains the woocommerce_checkout shortcode My account: #65 - /my-account/ - Contains the [woocommerce_my_account] shortcode Terms and conditions: #642 - /terms-and-conditions/ ### Theme ### Name: Twenty Twenty-Five Version: 1.1 Author URL: https://ww.wp.xz.cn 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 Theme type: Block theme WooCommerce Support: ❌ Not declared ### Templates ### Overrides: /var/www/wp-content/plugins/woocommerce/templates/block-notices/error.php /var/www/wp-content/plugins/woocommerce/templates/block-notices/notice.php /var/www/wp-content/plugins/woocommerce/templates/block-notices/success.php ### WooPayments ### Version: 9.2.0 Connected to WPCOM: Yes WPCOM Blog ID: 158635321 Account ID: acct_1QrQUHCAUq2S2E9E Payment Gateway: Enabled Test Mode: Disabled Enabled APMs: card WooPay: Enabled (product,cart,checkout) WooPay Incompatible Extensions: No Apple Pay / Google Pay: Enabled (product,cart,checkout) Fraud Protection Level: advanced Enabled Fraud Filters: AVS Verification,Address Mismatch,IP Address Mismatch,Order Items Threshold,Purchase Price Threshold Multi-currency: Enabled Auth and Capture: Disabled Documents: Disabled Logging: Disabled ### Subscriptions ### WCS_DEBUG: ✔ No Subscriptions Mode: ✔ Live Subscriptions Live URL: https://nebulasoftware.com Subscriptions-core Library Version: 8.1.1 Subscription Statuses: – WooCommerce Account Connected: ✔ Yes Active Product Key: ✔ Yes Custom Retry Rules: ✔ No Custom Retry Rule Class: ✔ No Custom Raw Retry Rule: ✔ No Custom Retry Rule: ✔ No Retries Migration Status: ✔ Completed Report Cache Enabled: ✔ Yes Cache Update Failures: ✔ 0 failure ### Store Setup ### Country / State: United States (US) — Arizona ### Subscriptions by Payment Gateway ### ### 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 subscription_amount_changes subscription_date_changes tokenization add_payment_method ### Admin ### Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customize-store customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner onboarding onboarding-tasks pattern-toolkit-full-composability product-custom-fields remote-inbox-notifications remote-free-extensions payment-gateway-suggestions printful shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page launch-your-store add-to-cart-with-options-stepper-layout Disabled Features: product-data-views experimental-blocks coming-soon-newsletter-template minified-js product-pre-publish-modal settings async-product-editor-category-field product-editor-template-system use-wp-horizon blockified-add-to-cart Daily Cron: ✔ Next scheduled: 2025-04-12 08:49:23 -07:00 Options: ✔ Notes: 3 Onboarding: completed ### Action Scheduler ### Canceled: 2 Oldest: 2025-03-11 09:16:32 -0700 Newest: 2025-03-13 08:05:37 -0700 Complete: 27,077 Oldest: 2025-03-12 11:51:03 -0700 Newest: 2025-04-11 05:49:25 -0700 Failed: 95 Oldest: 2025-02-01 07:31:16 -0700 Newest: 2025-04-11 05:49:24 -0700 Pending: 18 Oldest: 2025-04-11 05:50:24 -0700 Newest: 2025-04-18 05:45:42 -0700 ### Status report information ### Generated at: 2025-04-11 05:49:52 -07:00
The topic ‘TypeError: Cannot read properties of undefined (reading ‘split’)’ is closed to new replies.