NO BUG: Invalid Json answer, then fatal error

Hi! I made a woocommerce site, and when I try to insert the checkout or cart template with it’s template shortcode I get an “invalid json answer” error when updating the site. After that when I try to edit the cart or checkout page I get the fatal error message.
I changed PHP to 7.4 from 8.1, deleted and regenerated both the woocommerce sites, and remade the templates a lot of times now. The basic cart and checkout forms work a-okay. Everything works fine until I try to insert the Bricks templates.

Checkout:
Fatal error: Uncaught Error: Call to a member function needs_shipping() on null in C:\Users\sereg\Local Sites\rudspanset\app\public\wp-content\plugins\woocommerce\templates\checkout\form-billing.php on line 22
( ! ) Error: Call to a member function needs_shipping() on null in C:\Users\sereg\Local Sites\rudspanset\app\public\wp-content\plugins\woocommerce\templates\checkout\form-billing.php on line 22
Call Stack

Time Memory Function Location

1 0.0001 379264 {main}( ) …\post.php**:0
2 0.7227 34181008 require( ‘C:\Users\sereg\Local Sites\rudspanset\app\public\wp-admin\edit-form-blocks.php’ ) …\post.php
:187
3 0.7228 34187920 block_editor_rest_api_preload( ) …\edit-form-blocks.php
:77
4 0.7229 34190344 array_reduce ( ) …\block-editor.php
:753
5 1.0856 42432784 rest_preload_api_request( ) …\block-editor.php
:753
6 1.0856 42434256 rest_do_request( ) …\rest-api.php
:2918
7 1.0856 42434256 WP_REST_Server->dispatch( ) …\rest-api.php
:551
8 1.0874 42453848 WP_REST_Server->respond_to_request( ) …\class-wp-rest-server.php
:1041
9 1.0876 42455968 WP_REST_Posts_Controller->get_item( ) …\class-wp-rest-server.php
:1193
10 1.0877 42456416 WP_REST_Posts_Controller->prepare_item_for_response( ) …\class-wp-rest-posts-controller.php
:569
11 1.0885 42473208 apply_filters( ) …\class-wp-rest-posts-controller.php
:1863
12 1.0885 42473616 WP_Hook->apply_filters( ) …\plugin.php
:205
13 1.0894 42479304 do_shortcode( ) …\class-wp-hook.php
:324
14 1.0894 42483872 preg_replace_callback ( ) …\shortcodes.php
:273
15 1.0894 42484384 do_shortcode_tag( ) …\shortcodes.php
:273
16 1.0894 42484856 Bricks\Templates->render_shortcode( ) …\shortcodes.php
:433
17 1.1357 43498456 Bricks\Frontend::render_data( ) …\templates.php
:228
18 1.1357 43498832 Bricks\Frontend::render_element( ) …\frontend.php
:618
19 1.1396 43581760 Bricks\Element_Section->init( ) …\frontend.php
:519
20 1.1398 43649216 Bricks\Element_Section->render( ) …\base.php
:2298
21 1.1398 43649272 Bricks\Frontend::render_element( ) …\container.php
:938
22 1.1437 43732072 Bricks\Element_Container->init( ) …\frontend.php
:519
23 1.1438 43733240 Bricks\Element_Container->render( ) …\base.php
:2298
24 1.1438 43733296 Bricks\Frontend::render_element( ) …\container.php
:938
25 1.1462 43802376 Bricks\Woocommerce_Checkout_Customer_Details->init( ) …\frontend.php
:519
26 1.1463 43803584 Bricks\Woocommerce_Checkout_Customer_Details->render( ) …\base.php
:2298
27 1.1582 43926944 do_action( ) …\woocommerce-checkout-customer-details.php
:235
28 1.1582 43927320 WP_Hook->do_action( ) …\plugin.php
:517
29 1.1582 43927320 WP_Hook->apply_filters( ) …\class-wp-hook.php
:348
30 1.1582 43928072 WC_Checkout->checkout_form_billing( ) …\class-wp-hook.php
:324
31 1.1582 43928448 wc_get_template( ) …\class-wc-checkout.php
:335
32 1.1587 43930032 include( ‘C:\Users\sereg\Local Sites\rudspanset\app\public\wp-content\plugins\woocommerce\templates\checkout\form-billing.php’ ) …\wc-core-functions.php
:**345

Hi,
Thanks so much for your report!

Would you be so kind as to send temporary login credentials and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase?

Best regards,
timmse

Hi! It’s currenty on Local :pensive:

I uploaded the site to a live host, I sent an email with the information! :slight_smile:

Hi,
You have included a bricks_template shortcode within the Gutenberg content on both the cart and the checkout page, instead of the default [woocommerce_cart] and [woocommerce_checkout] shortcodes. When creating a cart or checkout template, it is automatically rendered within the WooCommerce shortcode.

Long story short: I have inserted the correct shortcodes and created a (very simple) cart and checkout template.

Thank you!! Sorry, I misunderstood that part of the tutorial completely :frowning: