Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Cart block not working on WordPress.com site #5866

Closed
tarunvijwani opened this issue Feb 16, 2022 · 14 comments · Fixed by #6718 or #7367
Closed

Cart block not working on WordPress.com site #5866

tarunvijwani opened this issue Feb 16, 2022 · 14 comments · Fixed by #6718 or #7367
Labels
block: cart Issues related to the cart block. focus: blocks Specific work involving or impacting how blocks behave. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue/PR concerns a confirmed bug.

Comments

@tarunvijwani
Copy link

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:

  • Core version: 5.9
  • Gutenberg version (if installed): 12.5.4
  • WooCommerce version: 6.2
  • WooCommerce Blocks version: 6.9.0
@tarunvijwani tarunvijwani added type: bug The issue/PR concerns a confirmed bug. block: cart Issues related to the cart block. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. labels Feb 16, 2022
@opr
Copy link
Contributor

opr commented Feb 16, 2022

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.

@tarunvijwani tarunvijwani added the focus: blocks Specific work involving or impacting how blocks behave. label Feb 16, 2022
@masperber
Copy link

Customer came in with this issue in 32837823-hc

Was able to workaround by using Shortcode block

@devNigel
Copy link

Facing the same issue on my test AT site.

@rinazrina
Copy link

Another report: 5167612-zd-woothemes

I can reproduce this on my test AT site too.

@wiesenhauss
Copy link

Another report: 35302175-hc

The issue appears on my test site too.

@tarunvijwani
Copy link
Author

tarunvijwani commented Jul 7, 2022

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
Copy link

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:

  • 36961223-hc

Followup:

  • 5567833-zd-woothemes

@edwinho89
Copy link

edwinho89 commented Oct 6, 2022

Another report below:

  • 5609786-zd-woothemes

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
Copy link
Contributor

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

@opr opr reopened this Oct 6, 2022
@jartes
Copy link

jartes commented Oct 11, 2022

Another report on 37342472-hc.

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

@pauljacobson
Copy link

pauljacobson commented Nov 6, 2022

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:

Capture_2022-11-06.at.12.11.12.mp4

Themes:

  • The user is using the Morden theme.
  • I was using Storefront on my site.

Plugins:

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

@eduardozulian
Copy link

This is still happening on 5689158-zen

The customer is using the shortcode workaround.

@PanosSynetos
Copy link
Contributor

PanosSynetos commented Nov 7, 2022

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
Copy link

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: cart Issues related to the cart block. focus: blocks Specific work involving or impacting how blocks behave. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet