Home Forums WoodMart support forum WooCommerce Single Product Page in Popup Causes Fatal Error

WooCommerce Single Product Page in Popup Causes Fatal Error

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #134095

    jmessenger919
    Participant

    Hello,

    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.
    #134100

    jmessenger919
    Participant

    This 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.

    #134136

    Artem Temos
    Keymaster

    Hello,

    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

    #134329

    jmessenger919
    Participant

    After 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

    #134336

    Artem Temos
    Keymaster

    Hi,

    Provide us with a list of steps on how to reproduce it on your website.

    Thank you in advance.

    #134623

    jmessenger919
    Participant

    I 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.

    #134666

    Artem Temos
    Keymaster

    Hi,

    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

    #134733

    jmessenger919
    Participant

    Yeah, 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?

    #134770

    Artem Temos
    Keymaster

    Try 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/ol1k20

    #134835

    jmessenger919
    Participant

    Hello,

    This has fixed the issue. Thanks!

    Are you going to include this in the next Woodmart release?

    Jesse

    #134862

    Artem Temos
    Keymaster

    Currently, 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.

Viewing 11 posts - 1 through 11 (of 11 total)