Fatal Error when adding or editing post, CPT, custom blocks…
-
Hello
On a stage site, I have a very weird issue : when I want to add or edit for example a post or a custom post type (with Crocoblockà or a content block (with Blocksy Theme) , I have this fatal error
' Fatal error: Uncaught Error: array_filter(): Argument #1 ($array) must be of type array, null given in /wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Shipping/ShippingController.php on line 310 Pile d’appel : array_filter() wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Shipping/ShippingController.php:310 Automattic\W\B\S\ShippingController::Automattic\W\B\S{closure}() array_map() wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Shipping/ShippingController.php:305 Automattic\W\B\S\ShippingController::filter_shipping_packages() wp-includes/class-wp-hook.php:308 WP_Hook::apply_filters() wp-includes/plugin.php:205 apply_filters() wp-content/plugins/woocommerce/includes/class-wc-shipping.php:274 WC_Shipping::calculate_shipping() wp-content/plugins/woocommerce/includes/class-wc-cart.php:1423 WC_Cart::calculate_shipping() wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php:42 Automattic\W\S\U\CartController::calculate_totals() wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AbstractCartRoute.php:91 Automattic\W\S\R\V\AbstractCartRoute::get_response() wp-includes/rest-api/class-wp-rest-server.php:1171 WP_REST_Server::respond_to_request() wp-includes/rest-api/class-wp-rest-server.php:1018 WP_REST_Server::dispatch() wp-includes/rest-api.php:535 rest_do_request() wp-includes/rest-api.php:2884 rest_preload_api_request() wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Assets/AssetDataRegistry.php:325 Automattic\W\B\A\AssetDataRegistry::hydrate_api_request() wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/AllProducts.php:40 Automattic\W\B\B\AllProducts::hydrate_from_api() wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/AllProducts.php:33 Automattic\W\B\B\AllProducts::enqueue_data() wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/AbstractBlock.php:100 Automattic\W\B\B\AbstractBlock::enqueue_editor_assets() wp-includes/class-wp-hook.php:308 WP_Hook::apply_filters() wp-includes/class-wp-hook.php:332 WP_Hook::do_action() wp-includes/plugin.php:517 do_action() wp-admin/edit-form-blocks.php:272 require() wp-admin/post.php:187 '
It occurs with pHp 8.0. If I set pHp 7.4, no problem
The stage site is placed on a subdomain
Apart from that, WooCommerce seems to work well. This fatal error occurs in the backend
I’ve disabled plugins and it is when WooCommerce is enabled that this issue occurs
I don’t really understand why the “ShippingCOntroller” could be a problem in this situation
Have you an idea to solve this issue?
- The topic ‘Fatal Error when adding or editing post, CPT, custom blocks…’ is closed to new replies.