Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gutenberg / WooCommerce conflict: Trying to get property 'ID' of non-object #7423

Closed
ouun opened this issue Jun 21, 2018 · 4 comments
Closed
Labels
Needs Testing Needs further testing to be confirmed. [Type] Plugin Interoperability Incompatibilities between a specific plugin and the block editor. Close with workaround notes.

Comments

@ouun
Copy link

ouun commented Jun 21, 2018

Describe the bug
Adding/Editing a page in Gutenberg while WooCommerce is activated, I receive the following PHP notice:

Trying to get property 'ID' of non-object from the function WC_Admin_Post_Types->hide_cpt_archive_templates() in /plugins/woocommerce/includes/admin/class-wc-admin-post-types.php:831

https://github.com/woocommerce/woocommerce/blob/0668eef680b3e3922071e8e5e9869db47bf414d8/includes/admin/class-wc-admin-post-types.php#L828

Deactivating WooCommerce or using the Classic Editor, the error doesn't show up.
As it's just a notice, it's not a big thing. But it seems to stop Gutenberg to work propably and autosaving never finishes. I have to reload the page and save again for any changes in the editor.

Versions

  • WP 4.9.6
  • Gutenberg 3.0.1
  • WooCommerce 3.4.3
@manake
Copy link

manake commented Jun 21, 2018

I also have this for the newly introduced to WooCommerce 3.4.3 block when WooCommerce itself is deactivated:

Fatal error: Uncaught Error: Call to undefined function wc_get_theme_support() in x\wp-content\plugins\woo-gutenberg-products-block\woocommerce-gutenberg-products-block.php on line 61

( ! ) Error: Call to undefined function wc_get_theme_support() in x\wp-content\plugins\woo-gutenberg-products-block\woocommerce-gutenberg-products-block.php on line 61

@Soean Soean added the [Type] Plugin Interoperability Incompatibilities between a specific plugin and the block editor. Close with workaround notes. label Jul 12, 2018
@mtias mtias added the Needs Testing Needs further testing to be confirmed. label Jul 19, 2018
@claudiulodro
Copy link
Contributor

@manake you should probably deactivate the Gutenberg Products Block feature plugin if you deactivate WooCommerce. :) I'll add an extra check to the Products Block plugin to prevent this error in the future. See woocommerce/woocommerce-blocks#100

@youknowriad
Copy link
Contributor

I think Woo did work on Gutenberg Compatibility and are still working on it. I'm going to close this at the moment. Please let me know if it's still an issue and we'll reopen.

@claudiulodro
Copy link
Contributor

All Gutenberg compatibility issues with WooCommerce should be fixed. If anyone notices a new one in the future please open an issue at the WooCommerce repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Testing Needs further testing to be confirmed. [Type] Plugin Interoperability Incompatibilities between a specific plugin and the block editor. Close with workaround notes.
Projects
None yet
Development

No branches or pull requests

6 participants