Home › Forums › WoodMart support forum › WooCommerce Single Product Page in Popup Causes Fatal Error
WooCommerce Single Product Page in Popup Causes Fatal Error
- This topic has 10 replies, 2 voices, and was last updated 5 years, 4 months ago by Artem Temos.
-
AuthorPosts
-
July 23, 2019 at 5:01 pm #134095
jmessenger919ParticipantHello,
When using WPBakery Builder and creating a Woodmart Popup which contains the default WooCommerce “Product Page” shortcode, I get a fatal error upon page update/publish.
Here are the details:
Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function wc_print_notices() in /var/www/vhosts/dev.cryptocrewuniversity.com/httpdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php:3622\nStack trace:\n#0 /var/www/vhosts/dev.cryptocrewuniversity.com/httpdocs/wp-includes/class-wp-hook.php(286): woocommerce_output_all_notices('')\n#1 /var/www/vhosts/dev.cryptocrewuniversity.com/httpdocs/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)\n#2 /var/www/vhosts/dev.cryptocrewuniversity.com/httpdocs/wp-includes/plugin.php(465): WP_Hook->do_action(Array)\n#3 /var/www/vhosts/dev.cryptocrewuniversity.com/httpdocs/wp-content/themes/woodmart/woocommerce/content-single-product.php(98): do_action('woodmart_before...')\n#4 /var/www/vhosts/dev.cryptocrewuniversity.com/httpdocs/wp-includes/template.php(724): require('/var/www/vhosts...')\n#5 /var/www/vhosts/dev.cryptocrewuniversity.com/httpdocs/wp-content/plugins/woocommerce/includes/wc-core-functions.php(195): load_template('/...\n', referer: https://dev.cryptocrewuniversity.com/wp-admin/post.php?post=3383&action=edit
This is a shame because having this in the popup looks really nice.
I am using PHP 7.2.7 and WP 5.2.2 with Woodmart 3.8.2 & WC 3.6.5.
Attachments:
You must be logged in to view attached files.July 23, 2019 at 7:02 pm #134100
jmessenger919ParticipantThis occurs on any installation of Woodmart, so it’s definitely an issue with the theme’s custom elements interacting with WooCommerce’s default shortcodes within WPBakery Builder.
Just an FYI.
July 24, 2019 at 6:10 am #134136
Artem TemosKeymasterHello,
Could you please disable all plugins that are not related to our theme and provide us your admin and FTP access so we can check it?
Thank you in advance
July 25, 2019 at 1:23 am #134329
jmessenger919ParticipantAfter testing, we’ve found the culprit.
This issue is related to a conflict with Yoast SEO, both the Free & Premium versions.
Because Yoast is the most popular SEO plugin for WordPress, can we expect a fix from Xtemos so we can do popups with WooCommerce shortcodes and still have the best SEO system for WP?
Thanks,
Jesse
July 25, 2019 at 6:03 am #134336
Artem TemosKeymasterHi,
Provide us with a list of steps on how to reproduce it on your website.
Thank you in advance.
July 26, 2019 at 4:34 pm #134623
jmessenger919ParticipantI have created a site specifically for testing this issue.
Yoast SEO is currently disabled. Look for the page called “Testing” as this is where the Woodmart popup is setup to contain a WooCommerce Product Page WPBakery element.
You should have no problem saving/updating this page.
Now enable Yoast SEO in Plugins and try saving/updating this page. You will get the white screen fatal error shown in OP, which forces you to hit the back button in your browser. You should see that your changes were in fact saved, but this white screen is a big issue.
This is true for both Free & Premium Yoast SEO. We went through every plugin we use to determine this is the case.
July 27, 2019 at 10:10 am #134666
Artem TemosKeymasterHi,
Yes, we see the error now. Could you please check how it works with default WordPress theme without the popup element? Only the single product page. If the problem happens only with WoodMart, please, send us your FTP access.
Regards
July 28, 2019 at 12:35 am #134733
jmessenger919ParticipantYeah, this is definitely not the issue. It only occurs with the Woodmart Popup + WooCommerce WPB “Product Page” Shortcode Inside Popup + Yoast SEO (Free/Premium) enabled.
What are your thoughts on the above, since you were able to replicate the issue?
July 28, 2019 at 11:14 am #134770
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file
add_action( 'woocommerce_before_single_product', 'woocommerce_output_all_notices', 10 );
and edit the file
woodmart\woocommerce\content-single-product.php
and remove the following code from there http://prntscr.com/ol1k20July 28, 2019 at 7:53 pm #134835
jmessenger919ParticipantHello,
This has fixed the issue. Thanks!
Are you going to include this in the next Woodmart release?
Jesse
July 29, 2019 at 6:01 am #134862
Artem TemosKeymasterCurrently, we will have to investigate the issue more so we suggest you to keep the fix. You can also copy that file to the child theme.
-
AuthorPosts
Tagged: Fatal error, Page Builder, popup, woocommerce
- You must be logged in to create new topics. Login / Register