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
406 stars 219 forks source link

WooCommerce not working with block-themes #10779

Closed skvaller closed 1 year ago

skvaller commented 1 year ago

Describe the bug

When activating the plugin, front (all outer pages) crash.

A clear and concise description of what the bug is. Bug started 3-4 WooCommerce updates ago. A security update.

To reproduce

When activating the plugin, website front crash, not admin. To test open 2 windows whereof 1 is plugins. Activate, deactivate. Update second window and website not working.

Expected behavior

Expecting WooCommerce function as before update.

What I've tried I've tried deactivating all plugins. Run a compatible control with all plugins, 1 at a time, and WooCommerce. Result: WooCommerce only work's with non block-themes. PHP: I've tried 7.1, 7.2, 8.1, 8.2. All other themes and all plugins work with all versions of PHP. WooCommerce work's with no PHP, unless not a block theme. Block-Themes tested: Raft, Macaque, Lighting Fixtures, Blue Note, WordPress 2023, Beaumont

WordPress (please complete the following information):

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

Add any other context about the problem here.

dinhtungdu commented 1 year ago

Hi @skvaller, thanks for opening this issue! To better identify the cause of the issue you're experiencing, can you please:

Btw, did you try activating only WooCommerce and see if the site crash?

mikejolley commented 1 year ago

You can also try going to WooCommerce > Status > Logs and checking if there are fatal errors reported there.

skvaller commented 1 year ago

Thank you for both replies. I tried after more plugin updates (an overhaul) to activate Woo. Critical Error, frontend crash. See screenprint. I took Mike Jolley's suggestion and checked status logs. This seem to be the error. "CRITICAL Uncaught Error: The SQLite3 object has not been correctly initialised or is already closed". I googled and found this "_Thanks for your report.

https://github.com/OllieJones/sqlite-object-cache/issues/36

This is a defect in Wordfence. It was a latent defect, but with my plugin it is not. There’s sometimes a race to be last between various plugins — to hook shutdown with the highest imaginable priority. It looks like Wordfence wins that race on your site, and then tries to use WordPress facilities like the cache after shutdown. I know there are other plugins in that race.

My plugin needs its close operation to avoid memory leaks and data inconsistency. I cannot just abandon my SQLite3 object by doing nothing in my close function.

I’ll try to figure out a workaround. It probably involves joining that race to be last. I was hoping to stay out of it_." Then I found this: "https://bugs.php.net/bug.php?id=47141"


To answer dinhtungdu, this is what site health says with woo activated "_REST API:et är ett sätt för WordPress och andra applikationer att kommunicera med servern. Ett exempel är blockredigeraren som använder gränssnittet för att visa och spara dina inlägg och sidor.

När REST API:et testades returnerades ett oväntat resultat:

REST API-ändpunkt: https://xristine.com/wp-json/wp/v2/types/post?context=edit REST API-svar: (500) Internal Server Error_"

And when Woo is deactivated, it says website "page cache is missing". So I'll try to install, a cache plugin and activate Woo. When Woo activated after installing cache plugin, site health return to "REST API-ändpunkt: https://xristine.com/wp-json/wp/v2/types/post?context=edit REST API-svar: (500) Internal Server Error"

History: This is what happened. Weeks ago, after woo-plugin update (8.0) my website frontend crashed. Please note "frontend only". In new tests I found the causing update to be 8.0. The woo-update that crash my website is 8.0. but when downloading and installing 7.9 all seem to work, at least it don't crash my frontend. The problem seem to be in the storage-change-update where also API has changed. I tried to active and deactivate the experimental feature (see screenprint), and I tried with deactivating non-compatible plugin's. Frontend crashed no matter action.

All other plugins works with all themes, including all block themes. Woo-plugins 8.0 - 8.3 works with no block theme, doesn't work alone nor with any plugins. Conclusion:

From my end it looks like the new caching solution in the woo-plugin may be be the bug. I will use 7.9 version until I can test an update. 2023-09-07 08 45 38 xristine com 3e4386b05ce0 2023-09-07 09 42 45 xristine com cca54dc3ce5d

danieldudzic commented 1 year ago

Sorry, that you are still experiencing this issue!

I believe the problem you are having is with the WooCommerce plugin? Please correct me if I misunderstood.

This is the repo for the WooCommerce Blocks plugin.

If you need help with WooCommece please follow the following resources page.

ralucaStan commented 1 year ago

Based on the lack of response I am going to close this ticket. Hope the resources in the comment above were useful