Opened 5 years ago
Last modified 3 months ago
#53573 new defect (bug)
Non-WP Blog Embeds are being cropped.
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | 5.7.2 |
| Component: | Embeds | Keywords: | close |
| Focuses: | ui, css | Cc: |
Description
When adding an embed for a non-WP blog post, for example, a NY Times story, the enclosing iFrame is not getting a default height set to it, which is causing the embed to crop off most of the information.
Issue seems to be the iframe generated is not expanding to include all of the content from the embed. If I manually set height: 400px; on the iframe, for example, it shows the content. However, the bottom is still cut off (seems the height of the embed in this case is 457px). The ma.tt embed in the screenshot has a height as an attribute of the iframe, the NYTimes does not.
@mamaduka tested this issue in both the Block Editor and Classic Editor with similar results. See comment here: https://github.com/WordPress/gutenberg/issues/28490
Attachments (2)
Change History (4)
#1
@
5 years ago
- Component changed from Editor to Embeds
- Keywords needs-testing added
I'm able to reproduce the issue, but only for the NYTimes. I'm not sure why the height is being omitted, especially since it's being included in the REST API response.
#2
@
3 months ago
- Keywords close added; needs-testing removed
Reproduction Report
Environment
- WordPress: 6.9
- PHP: 8.4.17
- Server: PHP.wasm
- Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
- Browser: Chrome 144.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- NYTimes Embed 1.0.0
- Test Reports 1.2.1
Steps taken
- First, add a test plugin to enable support for NYTimes embed. Code is below in Support content section.
- Head over to Posts > Add post, and add the embed block.
- Paste a NYTimes article link, and publish the post.
- Go to the frontend and observe the height of the embedded post.
- ❌ Bug is not occurring
Expected behavior
- The NYTimes post is displayed in full height.
Additional Notes
- This issue seems to have been resolved.
- Unable to pinpoint the exact code that fixed this issue.
- You need the test plugin, since NYTimes embeds are not in the WP allowed list.
- Related: ticket:49173, Gutenberg: 13000.
Screenshots/Screencast with results
Support Content
<?php
/**
* Plugin Name: NYTimes Embed
* Description: Add support for nytimes embed
* Version: 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
function nytimes_register_oembed_provider() {
wp_oembed_add_provider( '#https?://(www\.)?nytimes\.com/.*#i', 'https://www.nytimes.com/svc/oembed/json/', true );
}
add_action( 'init', 'nytimes_register_oembed_provider' );


Current result of adding NY Times post Embed