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

Pasting a New York Times URL results in an embed that is partially displayed #13000

Closed
jeremyfelt opened this issue Dec 19, 2018 · 9 comments
Closed
Labels
[Block] Embed Affects the Embed Block [Type] WP Core Ticket Requires an upstream change from WordPress. Core Trac ticket should be linked.

Comments

@jeremyfelt
Copy link
Member

Describe the bug

When I paste https://www.nytimes.com/2018/12/18/technology/walt-mossberg-quit-facebook.html into a new post, WordPress attempts to use oEmbed to display the article, but instead just shows a partial thumbnail.

If I inspect with developer tools and remove the height: auto; that NYT delivers with the iFrame via article.story .media .image img, then I do see that other content is available, it's just not being displayed.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new post
  2. Paste https://www.nytimes.com/2018/12/18/technology/walt-mossberg-quit-facebook.html into the first (or any) paragraph block.

Expected behavior

To be honest, I would expect that a pasted NYT URL does not embed automatically, but I'm probably in the minority.

The real expectation is probably that the embedded content appears in full.

Screenshots

auto-embed-nyt

Desktop (please complete the following information):

  • OS: OSX 10.12.6
  • Browser Chrome (latest)

Additional context
Using WordPress 5.0.1

@swissspidy swissspidy added Needs Testing Needs further testing to be confirmed. [Block] Embed Affects the Embed Block labels Dec 19, 2018
@Sergiono
Copy link

Sergiono commented Mar 5, 2019

I have the same problem. Also when clicking on a link, nothing happens.

@iandunn
Copy link
Member

iandunn commented Nov 22, 2019

Related #15102

@jeremyfelt
Copy link
Member Author

This has changed somewhat in that the (non-WordPress) NY Times URL is detected as a WordPress embed block and results in the following code:

<!-- wp:core-embed/wordpress {"url":"https://www.nytimes.com/2018/12/18/technology/walt-mossberg-quit-facebook.html","type":"wp-embed","providerNameSlug":"the-new-york-times","className":""} -->
<figure class="wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-the-new-york-times"><div class="wp-block-embed__wrapper">
https://www.nytimes.com/2018/12/18/technology/walt-mossberg-quit-facebook.html
</div></figure>
<!-- /wp:core-embed/wordpress -->

The display itself still appears broken as originally reported.

@youknowriad
Copy link
Contributor

I think this should probably be raised as a Core ticket instead as the embed HTML is not generated by Gutenberg itself but by the Oembed REST API.

@youknowriad youknowriad added [Type] WP Core Ticket Requires an upstream change from WordPress. Core Trac ticket should be linked. and removed Needs Testing Needs further testing to be confirmed. labels Jan 13, 2020
@paaljoachim
Copy link
Contributor

@youknowriad
Copy link
Contributor

Thanks @paaljoachim

@westonruter
Copy link
Member

I think the underlying issue is captured in https://core.trac.wordpress.org/ticket/49173

In particular, the Kses call in wp_filter_oembed_result() is stripping the style attribute from the iframe.

@paaljoachim
Copy link
Contributor

It would be great to get some movement on this issu

@desaiuditd has merged one issue in that we are now able to use a transform of an existing embed to a paragraph block (text link). We are working on another option to also convert existing embeds here: #21789

But this issue we are talking about here is different.
@desaiuditd is this issue something you can take a closer look at?

@jeremyfelt
Copy link
Member Author

Closing this because I'm pretty sure it's now https://core.trac.wordpress.org/ticket/49185

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] WP Core Ticket Requires an upstream change from WordPress. Core Trac ticket should be linked.
Projects
None yet
Development

No branches or pull requests

7 participants