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

Call to a member function get_id() on null in class-jetpack-woocommerce-analytics-universal.php:242 #20743

Closed
seanconklin opened this issue Aug 18, 2021 · 1 comment
Labels
[Closed] Duplicate Duplicate of an existing issue. [Feature] WooCommerce Analytics [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Type] Bug When a feature is broken and / or not performing as intended

Comments

@seanconklin
Copy link

Impacted plugin

Jetpack

Steps to Reproduce

  1. Jetpack Analytics, WooCommerce, Elementor Pro all enabled.
  2. Log in as a Shop Manager role user, or use User Switching to masquerade as one.
  3. Create a new Elementor product template under Templates > Theme Builder > Single Product or pull from a sample template
  4. Optionally change the product it's previewing under Page Settings (gear on the bottom left)
  5. Publish
  6. Click to View the template
  7. PHP fatal error in class-jetpack-woocommerce-analytics-universal.php:242

A clear and concise description of what you expected to happen.

The template should present normally, containing the product details. This requires Elementor Pro because it concerns Product templates, which are only available in Pro. The problem may affect other page builders as well.

I found a potentially related discussion here: https://wordpress.org/support/topic/fatal-error-in-jetpack-woocommerce-analytics/

What actually happened

PHP fatal error in class-jetpack-woocommerce-analytics-universal.php:242

Other information

CRITICAL Uncaught Error: Call to a member function get_id() on null in /nas/content/live/strymon/wp-content/plugins/jetpack/modules/woocommerce-analytics/classes/class-jetpack-woocommerce-analytics-universal.php:242
Stack trace:
#0 /nas/content/live/strymon/wp-includes/class-wp-hook.php(303): Jetpack_WooCommerce_Analytics_Universal->capture_product_view('')
#1 /nas/content/live/strymon/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
#2 /nas/content/live/strymon/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#3 /nas/content/live/strymon/wp-content/plugins/elementor-pro/modules/woocommerce/documents/product.php(123): do_action('woocommerce_aft...')
#4 /nas/content/live/strymon/wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php(189): ElementorPro\Modules\Woocommerce\Documents\Product->after_get_content()
#5 /nas/content/live/strymon/wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php(200): ElementorPro\Modules\ThemeBuilder\Docu in /nas/content/live/strymon/wp-content/plugins/jetpack/modules/woocommerce-analytics/classes/class-jetpack-woocommerce-analytics-universal.php on line 242

Operating System

Linux

OS Version

WP Engine Private Server

Browser

Firefox

Browser Version(s)

Latest

@seanconklin seanconklin added the [Type] Bug When a feature is broken and / or not performing as intended label Aug 18, 2021
@github-actions github-actions bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Aug 18, 2021
@jeherve
Copy link
Member

jeherve commented Aug 19, 2021

Thanks for the report. This is something we're currently tracking in #11301. I'll close your issue and add a reference to it in the main issue.

To fix the problem on your site until this gets fixed in Jetpack or in Elementor Pro, I would recommend that you go to the Jetpack menu in your dashboard, click on the "Modules" link in the footer of the page, and then disable the WooCommerce Analytics feature on the new page that will load.

@jeherve jeherve closed this as completed Aug 19, 2021
@jeherve jeherve added the [Closed] Duplicate Duplicate of an existing issue. label Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Closed] Duplicate Duplicate of an existing issue. [Feature] WooCommerce Analytics [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

2 participants