Pro related critical error when saving a page

Hi!

When saving a page, I am getting this message:

**Fatal error** : Uncaught Error: Call to a member function get_cart_contents_count() on null in /home/customer/www/***.com/public_html/wp-content/themes/pro/cornerstone/includes/classes/dynamic-content/class-dynamic-content-woocommerce.php:120 Stack trace: #0 /home/customer/www/***.com/public_html/wp-content/themes/pro/cornerstone/includes/classes/dynamic-content/class-dynamic-content-woocommerce.php(102): Cornerstone_Dynamic_Content_WooCommerce->render_cart_items() #1 /home/customer/www/***.com/public_html/wp-includes/class-wp-hook.php(287): Cornerstone_Dynamic_Content_WooCommerce->supply_field('', 'cart_items', Array) #2 /home/customer/www/***.com/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters('', Array) #3 /home/customer/www/***.com/public_html/wp-content/themes/pro/cornerstone/includes/classes/dynamic-content/class-dynamic-content.php(118): apply_filters('cs_dynamic_cont...', '', 'cart_items', Array) #4 [internal function]: Cornerstone_Dynamic_Content->exp in  **/home/customer/www/***.com/public_html/wp-content/themes/pro/cornerstone/includes/classes/dynamic-content/class-dynamic-content-woocommerce.php**  on line  **120**

There has been a critical error on your website. Please check your site admin email inbox for instructions.

Is there anything I can do about it?

Thanks!

Hi @Misho

Thanks for writing to us.

Can you please go through troubleshooting steps in our Common Issues article:

  1. Theme related Issue

  2. CSS/JS Customization

  3. PHP memory limit

  4. Child Theme

“It’s important that you do not skip any of those troubleshooting procedures because they are all relevant for your case”
Please make sure that your child theme is not the cause of the issue, please activate the parent theme and check the issue is exists or not.

If none of the above help and issue still exists, please copy your live site to a staging server so we could troubleshoot freely without breaking your live site.

Thanks

HI!

Plugin conflict test and deactivating the child theme didn’t showed anything.

Then I have started removing WooCommerce dynamic content and shortcodes, one by one from the page.

{{dc:woocommerce:cart_total}}
{{dc:woocommerce:cart_items}}
{{dc:post:permalink}}?add-to-cart=6110

Only after removing the last one, the page started to successfully save changes (Not changes in Pro, but when editing the page in WordPress).

Interesting thing is that I can access editing the page if “Classic editor” plugin is turned on, but I cannot save changes. If I turn the classic editor off, The warning screen appears immediately after clicking the “Edit” button, without even having a chance to open the edit screen.

I have created a staging website that is ok te destroy if needed. I will paste the link in the secure note.

Thanks!

Hi @Misho,

I checked and tested the said faulty page and it saves okay without issues, while the said DC Shortcode that causing the issue is also there upon testing.
Can you please let us know the steps to reproduce the issue at the staging server, it helps us diagnose the error.

Thanks

Hi!

I have now updated the staging site to WP 5.5, and also updated to the latest WooCommerce. The problem is still there. Details in the secure note.

Thanks!

Hi @Misho,

After a thorough examination of your website, I am able to replicate the issue at my end. I will report this issue to our issue tracker so this issue will be queued for fixing by our development team.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.