Skip to content

"Warning: Undefined array key" message appears after updating to 21.8.2 (conflict between Gutenberg and WooCommerce) #72466

@delilahwaan

Description

@delilahwaan

Description

The following error messages appear right on my homepage:

Warning: Undefined array key "archive-product" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "archive-product" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "single-product" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "single-product" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "taxonomy-product_cat" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "taxonomy-product_cat" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "taxonomy-product_tag" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "taxonomy-product_tag" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "product-search-results" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "product-search-results" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "page-cart" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "page-cart" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "order-confirmation" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "order-confirmation" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "page-checkout" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "page-checkout" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "taxonomy-product_attribute" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "taxonomy-product_attribute" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Warning: Undefined array key "coming-soon" in /home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php on line 304

Step-by-step reproduction instructions

Issue appears when Gutenberg and WooCommerce plugins are both installed and activated.

Screenshots, screen recording, code snippet

No response

Environment info

These error messages are new and started appearing after updating to 21.8.0 and have not been fixed by updating to the latest version of Gutenberg (21.8.2), or by uninstalling then reinstalling Gutenberg. I am running the Livro theme with the following plugins:

+--------------------------------------------------+----------+--------+-----------+----------------+-------------+
| name                                             | status   | update | version   | update_version | auto_update |
+--------------------------------------------------+----------+--------+-----------+----------------+-------------+
| woo-advanced-shipment-tracking                   | active   | none   | 3.8.7     |                | on          |
| allow-epub-and-mobi-formats-upload               | active   | none   | 1.0       |                | off         |
| cookie-law-info                                  | active   | none   | 3.3.5     |                | off         |
| woo-product-country-base-restrictions            | active   | none   | 3.7.5     |                | off         |
| editorplus                                       | active   | none   | 2.10.0    |                | on          |
| gutenberg                                        | inactive | none   | 21.8.2    |                | on          |
| official-mailerlite-sign-up-forms                | active   | none   | 1.7.14    |                | on          |
| woo-mailerlite                                   | active   | none   | 3.1.0     |                | off         |
| content-protector                                | active   | none   | 4.2.19    |                | on          |
| pixelyoursite                                    | active   | none   | 11.1.3    |                | off         |
| product-pre-orders-for-woo                       | inactive | none   | 1.3.0     |                | off         |
| product-notices-for-woocommerce                  | active   | none   | 1.3.4     |                | off         |
| product-page-shipping-calculator-for-woocommerce | inactive | none   | 1.3.49.62 |                | off         |
| woocommerce                                      | active   | none   | 10.2.2    |                | on          |
| woocommerce-square                               | active   | none   | 5.1.0     |                | on          |
| wpc-composite-products                           | active   | none   | 7.6.3     |                | off         |
| woo-product-bundle                               | active   | none   | 8.3.7     |                | on          |
+--------------------------------------------------+----------+--------+-----------+----------------+-------------+

The conflict seems to be with WooCommerce, as when I deactivate all plugins except for Gutenberg, then re-enable WooCommerce, the following error messages flash up at the top of the HTML code though they are not visible after the page has fully loaded:

<br />
--
<b>Warning</b>:  Undefined array key "archive-product" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "archive-product" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "single-product" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "single-product" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "taxonomy-product_cat" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "taxonomy-product_cat" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "taxonomy-product_tag" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "taxonomy-product_tag" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "product-search-results" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "product-search-results" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "page-cart" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "page-cart" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "order-confirmation" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "order-confirmation" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "page-checkout" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "page-checkout" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "taxonomy-product_attribute" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "taxonomy-product_attribute" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<br />
<b>Warning</b>:  Undefined array key "coming-soon" in <b>/home/public/wp-content/plugins/gutenberg/lib/compat/wordpress-6.9/template-activate.php</b> on line <b>304</b><br />
<!DOCTYPE html>

After also activating the woocommerce-square plugin (or any plugin dependent on woocommerce), the error messages become visible on the site.

Deactivate gutenberg gets rid of the error message but then results in a The installed theme requires [Gutenberg](https://wordpress.org/plugins/gutenberg/) version 12.8 or higher. error message throughout the admin backend. The front end and most of the site seems to display and function fine without gutenberg activated but it'd be better if the bug got fixed.

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Status] Needs More InfoFollow-up required in order to be actionable.[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions