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

Reusable Synced Pattern: Donation Block in Pattern causes Post Editor to Freeze #93072

Closed
lizswafford opened this issue Jul 29, 2024 · 6 comments · Fixed by Automattic/jetpack#38961
Assignees
Labels
[Block] Payment Button Formerly Recurring Payments Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Block Patterns Pattern content itself, and the functionality that lets you create patterns. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Platform] Atomic [Pri] High Address as soon as possible after BLOCKER issues [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts Triaged To be used when issues have been triaged. [Type] Bug

Comments

@lizswafford
Copy link

Quick summary

Inserting a Reusable Pattern which include a Donation Block can cause the post and page editor to freeze.
Error message: "The "jetpack-sidebar" plugin has encountered an error and cannot be rendered."

Steps to reproduce

Create a two new patterns using the Site Editor or a post or page editor. One pattern should include an image, text, and any other non-payment related blocks such as a button block. Name the pattern Test One (or similar).
The other pattern should have similar blocks as pattern one and include a Donation Block. Set the Donation Block to accept payments. Name the pattern Test Donation (or similar).

  • Go to Posts > Add New Post.
  • Click + > Patterns > My Patterns.
  • Select the pattern called Test One. Notice it is inserted into the editor.
  • Select the pattern called Test Donation. Notice the editor freezes.
  • Depending on your browser you may get an error message similar to: "This page is slowing down Firefox. To speed up your browser, stop this page."
  • Notice that items on the editor are not clickable, it's not possible to close the block inserter or click on list view.
  • A red banner with the error message "The "jetpack-sidebar" plugin has encountered an error and cannot be rendered."
  • Reload the post editor. Content added to the page is not saved.
  • Depending on the browser you may get an error message related to restoring blocks.

What you expected to happen

Adding a Donation Block to a pattern, then inserting the pattern to a page or post should not cause any errors.
Or if it is not possible to use a payment related block in a reusable pattern we should see a warning message stating that it's not doable.

What actually happened

Editing the patterns in the Site Editor is possible.
However, inserting the pattern in a post or page editor is not.

Impact

One

Available workarounds?

No and the platform is unusable

Platform (Simple and/or Atomic)

Atomic

Logs or notes

8473749-zd
Theme: Apostrophe 2

@lizswafford lizswafford added [Type] Bug [Feature] Block Patterns Pattern content itself, and the functionality that lets you create patterns. Needs triage Ticket needs to be triaged [Product] WordPress.com All features accessible on and related to WordPress.com. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. labels Jul 29, 2024
@github-actions github-actions bot added [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts [Platform] Atomic [Pri] High Address as soon as possible after BLOCKER issues labels Jul 29, 2024
Copy link

github-actions bot commented Jul 29, 2024

Support References

This comment is automatically generated. Please do not edit it.

  • 8473749-zen
  • 8368017-zen
  • 8627605-zen

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Jul 29, 2024
@lizswafford
Copy link
Author

Similar issue with PayPal Block inside a Pattern (8368017-zen)

@jartes
Copy link
Contributor

jartes commented Aug 13, 2024

📌 REPRODUCTION RESULTS

  • Tested on Simple – Replicated
  • Tested on Atomic – Replicated - With and without the GB plugin.
  • Replicable outside of Dotcom – No (it's a Dotcom feature)

📌 FINDINGS
This only happens when we create a Synced pattern. When creating this pattern as unsynced, it works:

Screen.Capture.on.2024-08-13.at.11-24-11.mp4

📌 ACTIONS

  • Triaged

CC @Automattic/gold

@jartes jartes changed the title Reusable Pattern: Donation Block in Pattern causes Post Editor to Freeze Reusable Synced Pattern: Donation Block in Pattern causes Post Editor to Freeze Aug 13, 2024
@jartes jartes added [Block] Payment Button Formerly Recurring Payments Triaged To be used when issues have been triaged. and removed Needs triage Ticket needs to be triaged labels Aug 13, 2024
@jartes jartes moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Aug 13, 2024
@lsl lsl moved this from Triaged to Ready for Development in Automattic Prioritization: The One Board ™ Aug 15, 2024
@arthur791004 arthur791004 self-assigned this Aug 19, 2024
@arthur791004 arthur791004 moved this from Ready for Development to In Progress in Automattic Prioritization: The One Board ™ Aug 19, 2024
@arthur791004
Copy link
Contributor

arthur791004 commented Aug 20, 2024

It's related to WordPress/gutenberg#63909. If a block that calls setAttributes when the component is mounting and create a custom pattern with this kind of the block, then the editor will get stucks when you insert that pattern.

The following blocks seem to have the same issue as well:

  • Payment
  • Search that is configured with the button-only

@hngdny
Copy link

hngdny commented Aug 21, 2024

Similar issue with PayPal Block inside a pattern 8627605-zen

@arthur791004
Copy link
Contributor

For similar issues, I think it would be better to wait for the fix on Gutenberg!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Payment Button Formerly Recurring Payments Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Block Patterns Pattern content itself, and the functionality that lets you create patterns. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Platform] Atomic [Pri] High Address as soon as possible after BLOCKER issues [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts Triaged To be used when issues have been triaged. [Type] Bug
5 participants