woocommerce / woocommerce-blocks

(Deprecated) This plugin has been merged into woocommerce/woocommerce
https://wordpress.org/plugins/woo-gutenberg-products-block/
GNU General Public License v3.0
403 stars 219 forks source link

Fatal error on latest beta 6.0.0 beta 1 in frontend #5236

Closed BackuPs closed 2 years ago

BackuPs commented 2 years ago

I just created a clean wp install with Woocommerce beta 1 V 6.0.0 and going to the frontend of the website shows me a fatal error.

No gutenberg plugin activate. Just installed the latest beta 6.0.0 beta 1 and I get this error in the frontend. Switching to 5.90 resolves the error. Please fix.

**

Fatal error: Uncaught Error: Call to undefined function Automattic\WooCommerce\Blocks\gutenberg_supports_block_templates() in /var/docs/server.tst/public/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTemplatesController.php on line 13

**

gigitux commented 2 years ago

Hi @BackuPs, thanks for filling this issue.

I tried to reproduce it in my site but wasn't able to do so. In order to further investigate the issue, would you be able to go to WooCommerce > Status, click on Get System Report and share it with us?

In the meantime, I would also suggest you to follow the WooCommerce Self-Service guide, which in many cases can help resolve any issues in your site.

BackuPs commented 2 years ago

Happens in any theme also storeront

`

WordPress Environment

WordPress address (URL): http://server.tst Site address (URL): http://server.tst WC Version: 6.0.0 REST API Version: ✔ 6.0.0 WC Blocks Version: ✔ 6.3.2 Action Scheduler Version: ✔ 3.3.0 WC Admin Version: ✔ 2.9.0-rc.2 Log Directory Writable: ✔ WP Version: ❌ 5.9-alpha-52231 - There is a newer version of WordPress available (5.9-alpha-52236) WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: ✔ WP Cron: ✔ Language: en_US External object cache: –

Server Environment

Server Info: Apache/2.4.41 (Ubuntu) PHP Version: 8.0.13 PHP Post Max Size: 128 MB PHP Time Limit: 600 PHP Max Input Vars: 5000 cURL Version: 7.68.0 OpenSSL/1.1.1j

SUHOSIN Installed: – MySQL Version: 8.0.27-0ubuntu0.20.04.1 Max Upload Size: 128 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ❌ Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected. DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔

Database

WC Database Version: 5.9.0 WC Database Prefix: wp_ Total Database Size: 11.43MB Database Data Size: 9.27MB Database Index Size: 2.16MB wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 0.02MB + Index: 0.13MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 5.03MB + Index: 0.06MB + Engine InnoDB wp_postmeta: Data: 1.50MB + Index: 0.56MB + Engine InnoDB wp_posts: Data: 1.42MB + Index: 0.09MB + Engine InnoDB wp_revslider_css: Data: 0.13MB + Index: 0.02MB + Engine InnoDB wp_revslider_css_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_layer_animations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_navigations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_sliders: Data: 0.03MB + Index: 0.02MB + Engine InnoDB wp_revslider_sliders_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_revslider_slides: Data: 0.13MB + Index: 0.02MB + Engine InnoDB wp_revslider_slides_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_revslider_static_slides: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_revslider_static_slides_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB

Post Type Counts

attachment: 227 nav_menu_item: 105 page: 110 portfolio: 28 post: 13 product: 42 product_variation: 11 slideshow: 5 wp_navigation: 2

Security

Secure connection (HTTPS): ❌ Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates. Hide errors from visitors: ❌Error messages should not be shown to visitors.

Active Plugins (4)

Slider Revolution: by ThemePunch – 6.5.11 WooCommerce Beta Tester: by WooCommerce – 2.0.4 WooCommerce: by Automattic – 6.0.0-beta.1 WordPress Beta Tester: by Peter Westwood Andy Fragen – 3.1.4

Inactive Plugins (18)

Akismet Anti-Spam: by Automattic – 4.2.1 Champion Responsive Menu: by The ThemeBuilders – 3.1.35 Elementor: by Elementor.com – 3.4.8 Elementor Pro: by Elementor.com – 3.5.1 Element Pack Pro: by BdThemes – 5.14.1 Enable jQuery Migrate Helper: by The WordPress Team – 1.3.0 Envato Theme Check: by Scott Parry – 20180222 Essential Grid: by ThemePunch – 3.0.13 Gutenberg: by Gutenberg Team – 11.9.1 Multiflex Responsive Menu: by The Themebuilders – 3.1.31 QuadMenu: by Mega Menu – 2.1.9 QuadMenu - OceanWP: by QuadMenu – 1.0.4 QuadMenu PRO: by Mega Menu – 1.9.3 RTL Tester: by Yoav Farhi Automattic – 1.2

Super Elements for Elementor: by ThemeRevealed – 2.2.4 Test jQuery Updates: by The WordPress Team – 2.0.0 Widget Importer & Exporter: by ChurchThemes.com – 1.6 WordPress Importer: by wordpressdotorg – 0.7

Settings

API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: left_space Thousand Separator: . Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5)

Connected to WooCommerce.com: –

WC Pages

Shop base: #5895 - /?page_id=5895 Cart: #5896 - /?page_id=5896 Checkout: #5897 - /?page_id=5897 My account: #5898 - /?page_id=5898 Terms and conditions: ❌ Page not set

Theme

Name: Storefront Version: 3.9.1 Author URL: https://woocommerce.com/ Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔

Templates

Overrides: –

Action Scheduler

Pending: 52 Oldest: -0001-11-30 00:00:00 +0000 Newest: 2021-11-24 11:28:08 +0000

Status report information

Generated at: 2021-11-24 13:32:39 +00:00 `

BackuPs commented 2 years ago

Fatal error: Uncaught Error: Call to undefined function Automattic\WooCommerce\Blocks\gutenberg_supports_block_templates() in /var/docs/server.tst/public/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTemplatesController.php on line 135

BackuPs commented 2 years ago

If i activate the Gutenberg plugin of course it works.... But i dont want to activate gutenberg. The error occurs when gutenberg is turned off

tammullen commented 2 years ago

This is occurring only with the latest WordPress nightly 5.9 Alpha. I can reproduce with just WC 6.0 and WP 5.9 5.9-alpha-52236, error goes away if using WP 5.8.2 Screenshot 2021-11-24 at 15 55 06

Aljullu commented 2 years ago

This was fixed in WC Blocks 6.4.0 (see https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/5183), however, the version of WC Blocks included in WooCommerce 6.0 is 6.3.2, so that fix was not included.

We will need to do a WC Blocks 6.3.3 release including this fix so it can be merged into WC 6.0.

BackuPs commented 2 years ago

Thank you for clearing that up.

codetycon commented 2 years ago

I am still facing an issuw with the latest woocomece version (6.7)

Uncaught Error: Call to undefined function Automattic\WooCommerce\StoreApi\Schemas\V1\rest_get_endpoint_args_for_schema() in /wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/AbstractSchema.php:273 Stack trace: #0 /wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartCoupons.php

gigitux commented 2 years ago

I am still facing an issuw with the latest woocomece version (6.7)

Uncaught Error: Call to undefined function Automattic\WooCommerce\StoreApi\Schemas\V1\rest_get_endpoint_args_for_schema() in /wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/AbstractSchema.php:273 Stack trace: #0 /wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/CartCoupons.php

Hi, I'm sorry to read this. Could you open an issue and give us more details about how to reproduce this issue? Thanks!