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

Unable to Swap Templates for Pages and Posts that contain an Amazon Embed #86207

Open
rw-ye opened this issue Jan 10, 2024 · 8 comments
Open
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Feature] Post/Page Editor The editor for editing posts and pages. [Platform] Atomic [Platform] Simple [Pri] Normal [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. [Type] Bug

Comments

@rw-ye
Copy link

rw-ye commented Jan 10, 2024

Quick summary

There is currently an issue where trying to swap a template on a page/post that contains an Amazon embed will cause the page to freeze and show an error message: This editor has encountered an unexpected error.

So far, I have been able to reproduce the issue on two FSE themes:

  • Byrne
  • Twenty-Twenty Two

Steps to reproduce

  1. Active Byrne or Twenty-Twenty Two theme
  2. Create a new page/post
  3. Add Amazon Kindle embed block, and paste in the URL to a product from Amazon
  4. Under page/post settings, click on "Swap Template"
  5. The page/post will freeze, and you won't be able to select a template, or the editor will crash with an error: This editor has encountered an unexpected error.
Screen.Recording.2024-01-10.at.12.53.35.pm.mov

What you expected to happen

To select a different template on the page/post

What actually happened

When trying to change the template, the entire page/post freezes, and a template can not be selected.

Impact

Some (< 50%)

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Atomic and Simple

Logs or notes

As a workaround, deleting the embed block, switching the template and then re-adding the embed block will work.

@rw-ye rw-ye added [Type] Bug [Feature] Post/Page Editor The editor for editing posts and pages. 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 Jan 10, 2024
@rw-ye
Copy link
Author

rw-ye commented Jan 10, 2024

This user is experiencing the issue: 7544640-zd-a8c

Copy link

github-actions bot commented Jan 10, 2024

Support References

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

  • 7544640-zen
  • 7601615-zen

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

liviopv commented Jan 10, 2024

📌 REPRODUCTION RESULTS

  • Tested on Simple – Could Not Replicate
  • Tested on Atomic – Could Not Replicate

📌 FINDINGS/SCREENSHOTS/VIDEO
Template swapping works as expected using a dummy Amazon link http://www.amazon.com/dp/B0BSB7X81Y

Test on simple:

CleanShot.2024-01-10.at.15.50.08.mp4

📌 ACTIONS

  • Requested author feedback
  • Closed as could not replicate (please reopen if the issue reoccurs)

📌 Message to Author
@rw-ye I wasn't able to replicate on Simple or Atomic on a test site, so it's not widespread but I can see it happens on the user site. I guess that it has to do with the template on this user's site, the error on the block is just a symptom. It's also important to note that this block has a very specific usage https://wordpress.org/documentation/article/amazon-kindle-embed/ and it will not accept just any Amazon links.

@liviopv liviopv closed this as completed Jan 10, 2024
@liviopv liviopv added [Closed] Not Reproducible Issue cannot be reproduced. and removed Needs triage Ticket needs to be triaged labels Jan 10, 2024
@rw-ye
Copy link
Author

rw-ye commented Jan 11, 2024

@liviopv I did some further testing and can still consistently reproduce the issue on both the Byrne and Twenty-Twenty Two themes.

Twenty-Twenty Two - Simple Site

Screen.Recording.2024-01-11.at.3.17.44.pm.mov

Byrne - Simple Site

Screen.Recording.2024-01-11.at.3.26.34.pm.mov

Twenty-Twenty Two - AT Site

Screen.Recording.2024-01-11.at.3.32.43.pm.mov

When trying to select the template, nothing happens and the browser essentially freezes. I was also able to reproduce on my second WPCOM account.

@rw-ye rw-ye reopened this Jan 11, 2024
@rw-ye rw-ye added Needs triage Ticket needs to be triaged [Closed] Not Reproducible Issue cannot be reproduced. and removed [Closed] Not Reproducible Issue cannot be reproduced. labels Jan 19, 2024
@mgozdis
Copy link

mgozdis commented Jan 24, 2024

Slightly similar issue here with the editor freezing when having an Amazon Kindle embed: 7601615-zd-a8c

It was making thousands of failed network requests: G7V6Th.png

Had to remove the block via the code editor and manually add it back, which then shows as an Embed rather than Amazon Kindle: 7kCvMh.png

@liviopv
Copy link

liviopv commented Jan 25, 2024

@rw-ye @mgozdis in both cases, the Amazon Kindle link being used seems incorrect. Documentation for the block https://wordpress.org/documentation/article/amazon-kindle-embed/ indicates the block will only accept URLs formatted in a very specific way:

Keep in mind that the link needs to follow this format: http://www.amazon.com/dp/ASIN where you will need to paste your preferred ASIN numbers and choose the corresponding locale (amazon.co.uk, amazon.com, and so on). More information can be found here: Linking from Your Website.

That said, even though I cannot reproduce the swap template issues when using correct links, I do see the multiple network requests @mgozdis flagged above, so I opened WordPress/gutenberg#58267 in core.

Keep in mind that this is most likely not going to be a quick fix, and there were discussions in the past advocating to remove this block, so it's a good idea to recommend alternative embeds to the customers.

@liviopv liviopv added [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. and removed [Closed] Not Reproducible Issue cannot be reproduced. labels Jan 31, 2024
@inaikem inaikem closed this as completed Oct 13, 2024
@inaikem inaikem reopened this Oct 13, 2024
@inaikem
Copy link
Contributor

inaikem commented Oct 15, 2024

@nuriapenya to ping Dotorg Design to offer help with a UI fix.

@Robertght
Copy link

📌 REPRODUCTION RESULTS

  • Tested on Simple – Could Not Replicate / Uncertain
  • Tested on Atomic – Could Not Replicate / Uncertain

📌 ACTIONS

  • Closing as could not replicate (please reopen if the issue reoccurs)
  • I agree that having a filter to limit what Amazon/Kindle links are added could help.

@inaikem do we want to keep this and have someone improve the above or open a new one?

@Robertght Robertght removed the Needs triage Ticket needs to be triaged label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Feature] Post/Page Editor The editor for editing posts and pages. [Platform] Atomic [Platform] Simple [Pri] Normal [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. [Type] Bug
Projects
Development

No branches or pull requests

5 participants