• Hello

    Since the last update I have broken ‘Product tab” blocks that appears automatically when I add a product.

    It’s 4 block with the message : “Your site doesn’t include support for the “woocommerce/product-tab” block. You can leave this block intact or remove it entirely.”

    I use this code to activate Gutunberg on product (it works fine until now) :

    // Enable Gutenberg Blocks in Product Descriptions
    function activate_gutenberg_product( $can_edit, $post_type ) {
        if ( $post_type == 'product' ) {
               $can_edit = true;
           }
           return $can_edit;
       }
       add_filter( 'use_block_editor_for_post_type', 'activate_gutenberg_product', 20, 2 );
       
       
       // Show taxonomy for woocommerce category and tags
       function enable_taxonomy_rest( $args ) {
           $args['show_in_rest'] = true;
           return $args;
       }
       add_filter( 'woocommerce_taxonomy_args_product_cat', 'enable_taxonomy_rest' );
       add_filter( 'woocommerce_taxonomy_args_product_tag', 'enable_taxonomy_rest' );
    

    I succed in a new website to see that once (product section> product Tab ? where is that from ?). Then when I register this page I have the same errors

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Beauty of Code (woo-hc)

    (@beautyofcode)

    Hi @ukubi ,

    Thanks for reaching out!

    I understand that since updating WooCommerce to its latest version, you are seeing the above message, is this correct?

    Would you mind walking us through the steps taken that lead you to this message being displayed? This way we can try and reproduce the issue on our end.

    Additionally, please can you share a copy of the following:

    • System Status Report: navigate to?WooCommerce?→?Status. Select?Get system report?and then?Copy for support.
    • Fatal Error log: Share a copy of any fatal error log found under?WooCommerce?→?Status?→?Logs.

    Once you have these, please share them in your response here.

    Hi @ccarter1180 ,

    I understand you are having the same issues as the one mentioned above.

    However, since each site setup is different, and to align with?forum best practices, please create a new topic so that we can address your issue(s) separately.

    You can create a new thread here. Please also share your System Status report and any fatal errors found in the error log, when doing this.

    Thanks for understanding!

    Thread Starter Kuroweb

    (@ukubi)

    Hello,

    thanks

    Steps in a new website with local.ch (I have the issue with website in production too) :
    1/ Install woocommerce
    2/ Add code to enable Gutunberg (no problem with classic editor)

    // Enable Gutenberg Blocks in Product Descriptions
    function activate_gutenberg_product( $can_edit, $post_type ) {
        if ( $post_type == 'product' ) {
               $can_edit = true;
           }
           return $can_edit;
       }
       add_filter( 'use_block_editor_for_post_type', 'activate_gutenberg_product', 20, 2 );
       
       
       // Show taxonomy for woocommerce category and tags
       function enable_taxonomy_rest( $args ) {
           $args['show_in_rest'] = true;
           return $args;
       }
       add_filter( 'woocommerce_taxonomy_args_product_cat', 'enable_taxonomy_rest' );
       add_filter( 'woocommerce_taxonomy_args_product_tag', 'enable_taxonomy_rest' );


    3/ Add a product
    4/ 4 blocks are automatically added in the product description (gutunberg)
    “Your site doesn’t include support for the “woocommerce/product-tab” block. You can leave this block intact or remove it entirely.”
    5/ If I save and refresh, the 4 blocks disappear (so it’s not a critical issue but it mostly confuses the store manager)

    Question : Is the code to activate Gutunberg reliable in your opinion? (essential in my opinion and it works fine, but I need to know if it represents a potential risk for sites in production)

    No fatal error

    Status Report

    WordPress Environment
    
    WordPress address (URL): https://atelier.local
    Site address (URL): https://atelier.local
    WC Version: 7.6.0
    REST API Version: ? 7.6.0
    WC Blocks Version: ? 9.8.4
    Action Scheduler Version: ? 3.5.4
    Log Directory Writable: ?
    WP Version: 6.2
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US
    External object cache: – Server Environment Server Info: nginx/1.16.0
    PHP Version: 8.1.9
    PHP Post Max Size: 1,000 MB
    PHP Time Limit: 1200
    PHP Max Input Vars: 4000
    cURL Version: 7.77.0
    OpenSSL/1.1.1q SUHOSIN Installed: –
    MySQL Version: 8.0.16
    Max Upload Size: 300 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ? Database WC Database Version: 7.6.0
    WC Database Prefix: wp_
    Total Database Size: 6.44MB
    Database Data Size: 5.01MB
    Database Index Size: 1.43MB
    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.11MB + 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: 4.05MB + Index: 0.03MB + Engine InnoDB
    wp_postmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_posts: Data: 0.05MB + Index: 0.06MB + 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_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + 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 Post Type Counts attachment: 1
    page: 7
    post: 1
    product: 1
    revision: 1
    wp_global_styles: 1 Security Secure connection (HTTPS): ?
    Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
    Hide errors from visitors: ? Active Plugins (1) WooCommerce: by Automattic – 7.6.0 Inactive Plugins (0) Settings API Enabled: –
    Force SSL: –
    Currency: USD ($)
    Currency Position: left
    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: –
    Enforce Approved Product Download Directories: ?
    Order datastore: WC_Order_Data_Store_CPT WC Pages Shop base: #7 - /boutique/
    Cart: #8 - /panier/
    Checkout: #9 - /commander/
    My account: #10 - /mon-compte/
    Terms and conditions: ? Page not set Theme Name: GeneratePress Child
    Version: 0.1
    Author URL: https://tomusborne.com
    Child Theme: ?
    Parent Theme Name: GeneratePress
    Parent Theme Version: 3.3.0
    Parent Theme Author URL: https://tomusborne.com
    WooCommerce Support: ? Templates Overrides: – Admin Enabled Features: activity-panels
    analytics
    coupons
    customer-effort-score-tracks
    import-products-task
    experimental-fashion-sample-products
    shipping-smart-defaults
    shipping-setting-tour
    homescreen
    marketing
    multichannel-marketing
    mobile-app-banner
    navigation
    onboarding
    onboarding-tasks
    remote-inbox-notifications
    remote-free-extensions
    payment-gateway-suggestions
    shipping-label-banner
    subscriptions
    store-alerts
    transient-notices
    woo-mobile-welcome
    wc-pay-promotion
    wc-pay-welcome-page Disabled Features: block-editor-feature-enabled
    minified-js
    new-product-management-experience
    product-variation-management
    settings Daily Cron: ? Next scheduled: 2023-04-20 11:51:24 +02:00
    Options: ?
    Notes: 51
    Onboarding: - Action Scheduler Complete: 59
    Oldest: 2023-04-18 13:52:21 +0200
    Newest: 2023-04-19 15:44:31 +0200 Failed: 1
    Oldest: 2023-04-19 15:40:39 +0200
    Newest: 2023-04-19 15:40:39 +0200 Pending: 2
    Oldest: 2023-04-19 15:48:20 +0200
    Newest: 2023-04-20 15:34:06 +0200 Status report information Generated at: 2023-04-19 15:48:30 +02:00
    `
    • This reply was modified 1 year, 7 months ago by Kuroweb.

    Hello,

    I have been experiencing the same issue since upgrading a WooCommerce install to 7.6.0 this week.

    I’ve traced the cause to PR 37174 on the GitHub repository, specifically the inclusion of the template property for the Product post type: https://github.com/woocommerce/woocommerce/pull/37174/files#diff-d1701283f2be5c1a5719882317ef95be754928e6366a059d4ce81b131910ddc2. I think this is intended for the new Product Editor feature currently in beta? But seems to impact setups where WordPress Core’s block editor/Gutenberg is enabled.

    The current workaround I’ve been using is to add a hook to the woocommerce_register_post_type_product filter and then unset the template key.

    function reset_product_template( $post_type_args ) {
    	if ( array_key_exists( 'template', $post_type_args ) ) {
    		unset( $post_type_args['template'] );
    	}
    
    	return $post_type_args;
    }
    add_filter( 'woocommerce_register_post_type_product', 'reset_product_template' );

    Cameron

    Saif

    (@babylon1999)

    Hello everyone,

    From my understanding, the issue only occurs when the Gutenberg block editor is enabled for “Products” with a filter. Since there isn’t a default option to enable the block editor, this may not be classified as a bug and is more of a customization request.

    @cameronterry did a really good job diagnosing the issue, so I recommend you try the suggestion mentioned above.

    However, if the proposed pull request ends up breaking other aspects of WooCommerce, please feel free to report an issue in GitHub or revert the change in a pull request for the developers to evaluate.

    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Site doesn’t include support for the “woocommerce/product-tab” block’ is closed to new replies.