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

Amazon Kindle embed wrongly treats products as previewable e-books #27547

Open
mcsf opened this issue Dec 7, 2020 · 2 comments
Open

Amazon Kindle embed wrongly treats products as previewable e-books #27547

mcsf opened this issue Dec 7, 2020 · 2 comments
Labels
[Block] Embed Affects the Embed Block [Type] Bug An existing feature does not function as intended

Comments

@mcsf
Copy link
Contributor

mcsf commented Dec 7, 2020

Likely introduced in #13510.
Reported in https://github.com/WordPress/gutenberg/pull/13510/files#r537489307

Describe the bug

When pasting Amazon URLs, such as for products that aren't e-books, the editor inserts an Amazon Kindle embed regardless of the resource that the URL describes.

To reproduce

Steps to reproduce the behavior:

  1. Grab a Amazon URL describing something that isn't an e-book, such as this vinyl: https://www.amazon.com/dp/B0198CGQEE/
  2. Paste the URL into the editor
  3. Notice the insertion of an Amazon Kindle embed block
  4. Try interacting with the block (either in the editor or the front end) and note how it wrongly presents a Preview button and how the Share function offers an invalid shortlink.

Expected behavior

  • The URL obtained via the embed's Share button should work
  • There should be no "Free Preview" button

Screenshots

output

@mcsf mcsf added [Type] Bug An existing feature does not function as intended [Block] Embed Affects the Embed Block labels Dec 7, 2020
@mtias
Copy link
Member

mtias commented Jul 14, 2021

Can we remove the kindle block if this isn't addressed or is too fragile?

@mcsf
Copy link
Contributor Author

mcsf commented Jul 14, 2021

I don't think that really changes things, since this all comes from the embed endpoint. The Kindle block is just an explicit block variation of the Embed block. Follow-up is more likely needed in core:

cc @Soean: perhaps you have a preference, since you introduced the block in #13510.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Embed Affects the Embed Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants