• Hi @anlino,
    I try to edit the “Hand-picked Products” woocommerce block, but I received this error:

    Display a selection of hand-picked products in a grid.
    The following error was returned
    <p>There has been a critical error on this website.</p><p>Learn more about troubleshooting WordPress.</p>

    I try to remove this block and create it again, but the problem persists.
    I try to change the theme, passing as Storefront or Twenty Twentyone, and the problem is fixed.

    When the block isn’t in editing mode, it returns the list of products.

    I try to activate the debug mode, and this is the log printed in the error_log file:

    [07-May-2021 13:33:22 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_id() on bool in /home/ccxutpcu/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/ProductSchema.php:432
    Stack trace:
    #0 /home/ccxutpcu/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/Products.php(56): Automattic\WooCommerce\Blocks\StoreApi\Schemas\ProductSchema->get_item_response(false)
    #1 /home/ccxutpcu/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/AbstractRoute.php(69): Automattic\WooCommerce\Blocks\StoreApi\Routes\Products->get_route_response(Object(WP_REST_Request))
    #2 /home/ccxutpcu/public_html/wp-includes/rest-api/class-wp-rest-server.php(1139): Automattic\WooCommerce\Blocks\StoreApi\Routes\AbstractRoute->get_response(Object(WP_REST_Request))
    #3 /home/ccxutpcu/public_html/wp-includes/rest-api/class-wp-rest-server.php(985): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/wc/store/produ...', Array, NULL)
    #4 /home/ccxutp in /home/ccxutpcu/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/ProductSchema.php on line 432

    Can you help me?
    Thank you for your answer and regards.

    Giovanni

Viewing 1 replies (of 1 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @civgio,

    That’s an add one. Can you make sure that you’re running the latest version of WooCommerce?

    If you are, try to install the latest version of the WooCommerce Blocks plugin separately. I seem to remember some mismatch between the versions of WooCommerce Blocks and WooCommerce in the most recent WooCommerce update.

    — Anders

Viewing 1 replies (of 1 total)
  • The topic ‘Critical error on “Hand-picked Products” block’ is closed to new replies.