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

Embed block: "Convert to link" causes console error #2552

Closed
miina opened this issue Jun 10, 2019 · 5 comments
Closed

Embed block: "Convert to link" causes console error #2552

miina opened this issue Jun 10, 2019 · 5 comments
Labels
Upstream Bug Requires an upstream change from WordPress, Gutenberg, or another dependency.

Comments

@miina
Copy link
Contributor

miina commented Jun 10, 2019

Steps to reproduce:

  • Add an Embed block.
  • Add URL, e.g. https://amp.wordpress.test.
  • Click "Embed".
  • When it says Sorry, this content could not be embedded., click "Convert to link"
  • See the error in console.

Screen Shot 2019-06-10 at 4 00 24 PM

@miina miina added Bug Something isn't working AMP Stories labels Jun 10, 2019
@miina miina self-assigned this Jun 10, 2019
@miina miina assigned miina and unassigned miina Jun 10, 2019
@swissspidy
Copy link
Collaborator

I assume "Convert to link" tries to create a paragraph block? If so, this is closely related to WordPress/gutenberg#15883 / #2455 and likely needs to be fixed upstream using a similar fix as WordPress/gutenberg#15885.

@miina
Copy link
Contributor Author

miina commented Jun 10, 2019

@swissspidy That's right, it tries to convert to a paragraph block. Wondering if we should hide the link in AMP Stories. Not sure if there's a good selector though. Thoughts?

@swissspidy
Copy link
Collaborator

Ideally we'd fix this upstream so the button would not show when the block type has been unregistered :-)

Not sure about a selector to hide the button in the meantime, I'd need to test it.

@miina
Copy link
Contributor Author

miina commented Jun 10, 2019

Ideally we'd fix this upstream so the button would not show when the block type has been unregistered :-)

Agreed!

Not sure about a selector to hide the button in the meantime, I'd need to test it.

We could target the second button of the error area which suggests converting to a link. However, not sure if that's reliable. I guess that if it's an upstream issue then it'd be OK to leave as it is for now as well.

@miina miina added Upstream Bug Requires an upstream change from WordPress, Gutenberg, or another dependency. and removed Bug Something isn't working labels Jun 10, 2019
@miina miina removed their assignment Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Upstream Bug Requires an upstream change from WordPress, Gutenberg, or another dependency.
Projects
None yet
Development

No branches or pull requests

3 participants