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 218 forks source link

Cart block not working on WordPress.com site #5866

Closed tarunvijwani closed 2 years ago

tarunvijwani commented 2 years ago

Describe the bug

If we create a new page and add a cart block on a WordPress.com site, the screen gets freeze, and the browser gets crashes after a few minutes.

To reproduce

Steps to reproduce the behavior:

  1. Go to My Site → Pages → Add New.
  2. Add Cart block to the page.
  3. Notice the screen gets freeze.

Expected behavior

Cart block should be added to the page

Environment

WordPress:

opr commented 2 years ago

Looks like requests are being made to the https://siteurl.com/wp-json/wp/v2/block-renderer/woocommerce/product-new?context=edit&attributes%5Bcolumns%5D=3&attributes%5Brows%5D=1&attributes%5BalignButtons%5D=false&attributes%5BcatOperator%5D=any&attributes%5BcontentVisibility%5D%5Btitle%5D=true&attributes%5BcontentVisibility%5D%5Bprice%5D=true&attributes%5BcontentVisibility%5D%5Brating%5D=true&attributes%5BcontentVisibility%5D%5Bbutton%5D=true&attributes%5BisPreview%5D=false&attributes%5BstockStatus%5D%5B0%5D=instock&attributes%5BstockStatus%5D%5B1%5D=outofstock&attributes%5BstockStatus%5D%5B2%5D=onbackorder&post_id=2&_locale=user

URL repeatedly on WPCOM, but not on local sites. I thought it would perhaps be lack of products causing this, but my WPCOM site has products.

masperber commented 2 years ago

Customer came in with this issue in 32837823-hc

Was able to workaround by using Shortcode block

devNigel commented 2 years ago

Facing the same issue on my test AT site.

rinazrina commented 2 years ago

Another report: 5167612-zd-woothemes

I can reproduce this on my test AT site too.

wiesenhauss commented 2 years ago

Another report: 35302175-hc

The issue appears on my test site too.

tarunvijwani commented 2 years ago

On a WordPress.com site, I was able to add the Cart and Checkout blocks to a page. But the front end doesn't load the content of the blocks. In the editor, it loads just fine.

Site: https://testingatomicsite.wpcomstaging.com/

WooCommerce: 6.6.1 WooCommerce blocks: 8.0.0

Editor Front-end
image image
csabarakasz commented 2 years ago

Another report. On my test site, I could not replicate this, but on the user's site, I could. I deactivated all user plugin and switched themes. Didn't help.

Original chat:

Followup:

edwinho89 commented 2 years ago

Another report below:

I'm able to reproduce the issue on user's site and mine.

Based on another ticket in 5167612-zd-woothemes , I tried switching between FSE and non-FSE themes, both having similar issue.

PanosSynetos commented 2 years ago

Same for me - I was setting up a demo site for @manospsyx and it hang and crashed (tried Chrome and Firefox)

No errors in console

jartes commented 2 years ago

Another report on 37342472-hc.

I was able to replicate this on a WordPress.com site. Suggested shortcodes as a workaround.

pauljacobson commented 1 year ago

Hi @senadir 👋 I have another report of this issue in 5684636-zen

I was able to reproduce this on my test site on a draft page. Both the user and I received an error like this when trying to add the Cart Block using the block selector: 2e1e5-pb/

This is what I experienced:

https://user-images.githubusercontent.com/2912202/200165283-bbd573fa-defb-4d23-9257-80d90e5c61cc.mp4

Themes:

Plugins:

For my test, I only had our preinstalled plugins enabled, along with WooCommerce.

eduardozulian commented 1 year ago

This is still happening on 5689158-zen

The customer is using the shortcode workaround.

PanosSynetos commented 1 year ago

If memory serves me well, these issues will be fixed in the upcoming WooCommerce 7.1 release (that will include the new version of blocks) - But I'll leave it to the owners of the repository to check and let you know.

@pauljacobson can you try Woo 7.0 and https://wordpress.org/plugins/woo-gutenberg-products-block/ on your test site ?

This will install the latest Woo Blocks version, overriding the one bundled with WooCommerce 7.0 .

I wouldn't recommend suggesting this to clients, as WooCommerce 7.1 is released tomorrow, which contains the latest Blocks. But if they are in a hurry and need to fix their issues, it wouldn't hurt.

pauljacobson commented 1 year ago

@pauljacobson can you try Woo 7.0 and https://wordpress.org/plugins/woo-gutenberg-products-block/ on your test site ?

This will install the latest Woo Blocks version, overriding the one bundled with WooCommerce 7.0 .

Hi there @PanosSynetos 👋 Thank you for the suggestion. I also received this suggestion from the team on Slack. I've already relayed this suggestion but I'll bear in mind the 7.1 release if I encounter this issue again.