We are experiencing a fatal error, often several times per day.
The log entry is as follows:
2022-05-12T04:25:09+00:00 CRITICAL Uncaught Error: Call to a member function is_visible() on null in /nas/content/live/borregooutfitt/wp-content/themes/xstore/woocommerce/product-added-to-cart.php:26
Stack trace:
#0 /nas/content/live/borregooutfitt/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include()
#1 /nas/content/live/borregooutfitt/wp-content/themes/xstore/framework/woo.php(1866): wc_get_template(‘product-added-t…’, Array)
#2 /nas/content/live/borregooutfitt/wp-includes/class-wp-hook.php(307): etheme_added_to_cart_popup(”)
#3 /nas/content/live/borregooutfitt/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(”, Array)
#4 /nas/content/live/borregooutfitt/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
#5 /nas/content/live/borregooutfitt/wp-admin/admin-ajax.php(202): do_action(‘wp_ajax_nopriv_…’)
#6 {main}
thrown in /nas/content/live/borregooutfitt/wp-content/themes/xstore/woocommerce/product-added-to-cart.php on line 26
Please advise. Thanks for the assistance, the theme is great for our site.
Hello,
1) Describe your actions step by step to reproduce the error, please.
2) Try to disable all the third-party plugins (including cache plugins), that do not come bundled with XStore https://xstore.helpscoutdocs.com/article/36-included-plugins , clear the cache of the browser, and check then. Maybe one of the additional plugins is a reason for the problem.
Regards
Hello Olga,
We cannot replicate the error directly, and it occurs only a few times per day.
We cannot disable all plugins, because our production site – where the errors occur, depends on them for its operation. We do not have any caching plugins – the only caching on the site comes from WPEngines, and the associated Cloudflare CDN.
It seems that this error is coming from XStore – can you track it down in another way??
Best regards,
Ben
Hello,
If it’s not allowed to disable plugins on the production site then could you, please, create a staging site (full copy of the production)? Because we will need to make tests and code changes to fix the issue, so then better if do this on the staging site than on production.
Regards
Hello Olga,
I have pushed a fresh copy of the site to our staging site. Admin credentials and sftp info is in the private content area.
I will not change anything on that staging site until I hear back from you.
FYI, there is no WPEngine or CDN caching on the staging site.
Your assistance is much appreciated!
Regards,
Ben
Hello,
Thanks for the reply.
One of our technicians will give an answer after the weekend. Please be patient
Regards
Hello,
We are trying to reproduce the error on the staging site but never get that. Any chance that we could get a video from you where you face the error? Or at least what product do you add to the cart that gives the error?
Function that we use and that gives the error in your log is the default WooCommerce function https://woocommerce.wp-a2z.org/oik_api/wc_productis_visible/
We found a similar report about such an issue here https://wordpress.org/support/topic/ajax-call-error500/ and as we can see it was caused by the cache.
Regards
Unfortunately, I do not know what is causing this error and am not able to replicate it. It has been showing up a couple times a day, on most days, under the store traffic we have on the site.
I notice that you must have cleared out our logs on the production site, and the error has not yet recurred. Did you make any other changes??
At any rate, I’ll watch for the error, and perhaps get some help from wpengine, our hosting company, to explore whether there might be a cacheing exclusion needed related to this problem.
Thanks again for your help trying to track this down.
Regards,
Ben
Hello,
I cleared the cache and then cleared logs to check if the error appears again. But did not get that.
Ok, let me know if you face it again.
Regards
Thank you. I will keep an eye out and see if I can get to the bottom of this. I am deactivating admin access for now.
Regards,
Ben
You must be logged in to reply to this topic.Log in/Sign up
One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.