• Resolved superskl5000

    (@superskl5000)


    When I try to use the woocommerce blocks for cart it throws a fatal error on the page. The shortcode for the cart page works, but not the woocommerce block.

    * Line 226
    * Message Uncaught TypeError: html_entity_decode(): Argument #1 ($string) must be of type string, array given in /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-content/plugins/woo-gutenberg-products-block/src/BlockTypes/Cart.php:226 Stack trace: #0 [internal function]: html_entity_decode() #1 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-content/plugins/woo-gutenberg-products-block/src/BlockTypes/Cart.php(226): array_map() #2 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-content/plugins/woo-gutenberg-products-block/src/BlockTypes/Cart.php(169): Automattic\WooCommerce\Blocks\BlockTypes\Cart->deep_sort_with_accents() #3 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-content/plugins/woo-gutenberg-products-block/src/Assets/AssetDataRegistry.php(258): Automattic\WooCommerce\Blocks\BlockTypes\Cart->Automattic\WooCommerce\Blocks\BlockTypes\{closure}() #4 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-content/plugins/woo-gutenberg-products-block/src/Assets/AssetDataRegistry.php(359): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->execute_lazy_data() #5 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-includes/class-wp-hook.php(307): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->enqueue_asset_data() #6 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #7 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-includes/plugin.php(476): WP_Hook->do_action() #8 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-includes/script-loader.php(2139): do_action() #9 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-includes/class-wp-hook.php(307): wp_print_footer_scripts() #10 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #11 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-includes/plugin.php(476): WP_Hook->do_action() #12 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-includes/general-template.php(3058): do_action() #13 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-content/themes/kadence/footer.php(38): wp_footer() #14 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-includes/template.php(770): require_once('/home/516558.cl...') #15 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-includes/template.php(716): load_template() #16 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-includes/general-template.php(92): locate_template() #17 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-content/themes/kadence/page.php(22): get_footer() #18 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-includes/template-loader.php(106): include('/home/516558.cl...') #19 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-blog-header.php(19): require_once('/home/516558.cl...') #20 /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/index.php(17): require('/home/516558.cl...') #21 {main} thrown
    * File /home/516558.cloudwaysapps.com/yucfgwgahw/public_html/wp-content/plugins/woo-gutenberg-products-block/src/BlockTypes/Cart.php

    This is the error that it gives me whenever I use the woocommerce block for the cart page. Please offer some advice on how I may resolve this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support wpnomad a11n

    (@wpnomad)

    Hi @superskl5000 ,

    I checked this on our test site where we’re unable to replicate the behaviour. The issue is likely occurring due to a conflict on your site.
     
    The best way to determine this is to:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.`

    Thanks for reporting this issue @superskl5000. I did some investigation and did discover there are potentially some conditions with store configuration that can reproduce this error. I haven’t isolated exactly what those conditions are but have created a PR that should fix this and prevent a fatal error from occurring. The fix should surface in the next version of WooCommerce blocks after this PR is successfully merged.

    Plugin Support lionel.a11n

    (@lioneldaniel)

    Hi @superskl5000,

    Thanks again for reporting this issue! Since developer action has been taken on your issue, I’m marking this topic ‘Resolved’ for now. If the next update to Blocks doesn’t resolve your issue, please don’t hesitate to open a new topic – you can link to this post for reference.

    Thanks!

    Plugin Author tarunvijwani

    (@tarunvijwani)

    @superskl5000 Could you please help us with your configuration for sell to countries and ship to countries options? You can find this information at WooCommerce > Settings > General > General options.

    Looking forward to hearing back from you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Woocommerce blocks cart page gives fatal error’ is closed to new replies.