Encountering a fatal error in versions 9.6.1 and 9.6.2.
-
Hello Support Team,
We just want to share the fatal error we encountered when clicking the “Add to Cart” button. The cart page is not loading due to this fatal error.PHP Fatal error: ?Uncaught TypeError: Automattic\WooCommerce\StoreApi\Schemas\V1\CartItemSchema::get_cart_images(): Argument #3 ($cart_item_key) must be of type string, null given, called in /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/StoreApi/Schemas/V1/CartItemSchema.php on line 74 and defined in /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/StoreApi/Schemas/V1/CartItemSchema.php:99Stack trace:#0 /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/StoreApi/Schemas/V1/CartItemSchema.php(74): Automattic\WooCommerce\StoreApi\Schemas\V1\CartItemSchema->get_cart_images()#1 [internal function]: Automattic\WooCommerce\StoreApi\Schemas\V1\CartItemSchema->get_item_response()#2 /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/StoreApi/Schemas/V1/AbstractSchema.php(285): array_map()#3 /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/StoreApi/Schemas/V1/CartSchema.php(352): Automattic\WooCommerce\StoreApi\Schemas\V1\AbstractSchema->get_item_responses_from_schema()#4 /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/StoreApi/Routes/V1/Cart.php(59): Automattic\WooCommerce\StoreApi\Schemas\V1\CartSchema->get_item_response()#5 /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/StoreApi/Routes/V1/AbstractRoute.php(126): Automattic\WooCommerce\StoreApi\Routes\V1\Cart->get_route_response()#6 /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/StoreApi/Routes/V1/AbstractCartRoute.php(125): Automattic\WooCommerce\StoreApi\Routes\V1\AbstractRoute->get_response_by_request_method()#7 [internal function]: Automattic\WooCommerce\StoreApi\Routes\V1\AbstractCartRoute->get_response()#8 /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/Blocks/Domain/Services/Hydration.php(155): call_user_func_array()#9 /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/Blocks/Domain/Services/Hydration.php(65): Automattic\WooCommerce\Blocks\Domain\Services\Hydration->get_response_from_controller()#10 /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/Blocks/Assets/AssetDataRegistry.php(322): Automattic\WooCommerce\Blocks\Domain\Services\Hydration->get_rest_api_response_data()#11 /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/Blocks/BlockTypes/Cart.php(257): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->hydrate_api_request()#12 /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/Blocks/BlockTypes/AbstractBlock.php(416): Automattic\WooCommerce\Blocks\BlockTypes\Cart->enqueue_data()#13 /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/Blocks/BlockTypes/Cart.php(147): Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->enqueue_assets()#14 /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/Blocks/BlockTypes/AbstractBlock.php(96): Automattic\WooCommerce\Blocks\BlockTypes\Cart->enqueue_assets()#15 /var/www/html/wordpress/wp-includes/class-wp-block.php(537): Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->render_callback()#16 /var/www/html/wordpress/wp-includes/blocks.php(2191): WP_Block->render()#17 /var/www/html/wordpress/wp-includes/blocks.php(2243): render_block()#18 /var/www/html/wordpress/wp-includes/class-wp-hook.php(324): do_blocks()#19 /var/www/html/wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters()#20 /var/www/html/wordpress/wp-includes/post-template.php(256): apply_filters()#21 /var/www/html/wordpress/wp-content/themes/astra/template-parts/single/content-header.php(37): the_content()#22 /var/www/html/wordpress/wp-includes/template.php(812): require('...')#23 /var/www/html/wordpress/wp-includes/template.php(745): load_template()#24 /var/www/html/wordpress/wp-includes/general-template.php(206): locate_template()#25 /var/www/html/wordpress/wp-content/themes/astra/inc/template-parts.php(374): get_template_part()#26 /var/www/html/wordpress/wp-includes/class-wp-hook.php(324): astra_entry_content_single_page_template()#27 /var/www/html/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()#28 /var/www/html/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()#29 /var/www/html/wordpress/wp-content/themes/astra/inc/core/theme-hooks.php(450): do_action()#30 /var/www/html/wordpress/wp-content/themes/astra/template-parts/content-page.php(28): astra_entry_content_single_page()#31 /var/www/html/wordpress/wp-includes/template.php(812): require('...')#32 /var/www/html/wordpress/wp-includes/template.php(745): load_template()#33 /var/www/html/wordpress/wp-includes/general-template.php(206): locate_template()#34 /var/www/html/wordpress/wp-content/themes/astra/inc/class-astra-loop.php(110): get_template_part()#35 /var/www/html/wordpress/wp-includes/class-wp-hook.php(324): Astra_Loop->template_parts_page()#36 /var/www/html/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()#37 /var/www/html/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()#38 /var/www/html/wordpress/wp-content/themes/astra/inc/class-astra-loop.php(198): do_action()#39 /var/www/html/wordpress/wp-content/themes/astra/inc/class-astra-loop.php(175): Astra_Loop->loop_markup()#40 /var/www/html/wordpress/wp-includes/class-wp-hook.php(324): Astra_Loop->loop_markup_page()#41 /var/www/html/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()#42 /var/www/html/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()#43 /var/www/html/wordpress/wp-content/themes/astra/inc/core/theme-hooks.php(265): do_action()#44 /var/www/html/wordpress/wp-content/themes/astra/page.php(32): astra_content_page_loop()#45 /var/www/html/wordpress/wp-includes/template-loader.php(106): include('...')#46 /var/www/html/wordpress/wp-blog-header.php(19): require_once('...')#47 /var/www/html/wordpress/index.php(17): require('...')#48 {main}? thrown in /var/www/html/wordpress/wp-content/plugins/woocommerce_latest/src/StoreApi/Schemas/V1/CartItemSchema.php on line 99
So, we want to know why this is happening. Also, we have tried it on localhost with only one active plugin, which is WooCommerce.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.