Critical Error displaying or editing a page with a Featured Item block
-
This may or may not be an error related to updating my server to PHP 8.2. I saw an error in the block before the update, but it didn’t break the site. In any case, here’s what I’m seeing in the error log.
Is this a bug, or did something get messed up in my page (or both)?
Error Details ============= An error of type E_ERROR was caused in line 223 of the file /.../wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/FeaturedItem.php. Error message: Uncaught TypeError: Unsupported operand types: string * int in /.../wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/FeaturedItem.php:223 Stack trace: #0 /.../wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/FeaturedItem.php(118): Automattic\WooCommerce\Blocks\BlockTypes\FeaturedItem->render_image() #1 /.../wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/AbstractBlock.php(88): Automattic\WooCommerce\Blocks\BlockTypes\FeaturedItem->render() #2 /.../wp-includes/class-wp-block.php(256): Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->render_callback() #3 /.../wp-includes/blocks.php(1051): WP_Block->render() #4 /.../wp-includes/blocks.php(1089): render_block() #5 /.../wp-includes/class-wp-hook.php(308): do_blocks() #6 /.../wp-includes/plugin.php(205): WP_Hook->apply_filters() #7 /.../wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1857): apply_filters() #8 /.../wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(568): WP_REST_Posts_Controller->prepare_item_for_response() #9 /.../wp-includes/rest-api/class-wp-rest-server.php(1171): WP_REST_Posts_Controller->get_item() #10 /.../wp-includes/rest-api/class-wp-rest-server.php(1018): WP_REST_Server->respond_to_request() #11 /.../wp-includes/rest-api.php(535): WP_REST_Server->dispatch() #12 /.../wp-includes/rest-api.php(2884): rest_do_request() #13 [internal function]: rest_preload_api_request() #14 /.../wp-includes/block-editor.php(635): array_reduce() #15 /.../wp-admin/edit-form-blocks.php(77): block_editor_rest_api_preload() #16 /.../wp-admin/post.php(187): require('...') #17 {main} ?thrown
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Critical Error displaying or editing a page with a Featured Item block’ is closed to new replies.