Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#38694 closed defect (bug) (fixed)

Embeds not working in IE 11

Reported by: fencer04's profile Fencer04 Owned by: swissspidy's profile swissspidy
Milestone: 4.7 Priority: normal
Severity: normal Version: 4.4
Component: Embeds Keywords: has-patch commit
Focuses: javascript Cc:

Description (last modified by swissspidy)

When using Twenty Seventeen oEmbeds from WordPress links don't show the box and style in Internet Explorer 11.

Attachments (2)

ie11-embed-issue.jpg (70.0 KB) - added by Fencer04 8 years ago.
Chrome view vs. IE 11 view.
38694.diff (903 bytes) - added by swissspidy 8 years ago.

Download all attachments as: .zip

Change History (11)

@Fencer04
8 years ago

Chrome view vs. IE 11 view.

#1 @swissspidy
8 years ago

  • Description modified (diff)
  • Summary changed from oEmbed from Wordpress Post doesn't have correct style in IE11 to oEmbed from WordPress Post doesn't have correct style in IE11

Hey there,

Thanks for your report! Would you mind sharing a screenshot of the visual inconsistencies?

Edit: Just saw the screenshot now :-)

Last edited 8 years ago by swissspidy (previous) (diff)

This ticket was mentioned in Slack in #core by helen. View the logs.


8 years ago

#3 @swissspidy
8 years ago

  • Version trunk deleted

@swissspidy
8 years ago

#4 @swissspidy
8 years ago

  • Component changed from Bundled Theme to Embeds
  • Focuses javascript added
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.8
  • Summary changed from oEmbed from WordPress Post doesn't have correct style in IE11 to Embeds not working in IE 11
  • Version set to 4.4

The problem you're having is not about missing styles. Instead, the iframe is not being loaded at all.

WordPress embeds consist of two parts: a <blockquote> element and an <iframe>. The quote is shown by default and eventually replaced by the iframe if it loads successfully. To be more precise, the iframe sends a message to the embedding site when it's been loaded completely to say it's ready.

So on your second screenshot, the iframe is not loaded for some reason. I just tested embeds on IE 11 as well and it turns out the browser never reaches the line where the security attribute should be removed for IE 10 and IE 11. Why? WordPress always adds the data-secret attribute in wp_filter_oembed_result(), this the check in wp-embed.js is flawed.

Looks like this has been broken all the way since 4.4 :-( Perhaps introduced in [35577].

Pinging @pento.

#5 @pento
8 years ago

  • Keywords commit added
  • Owner set to swissspidy
  • Status changed from new to assigned

I'm a little surprised that this managed to be broken for so long, but I agree that [35577] is the likely culprit.

38694.diff looks good as a fix.

#6 @swissspidy
8 years ago

  • Milestone changed from 4.8 to 4.7

This ticket was mentioned in Slack in #core by helen. View the logs.


8 years ago

#8 @swissspidy
8 years ago

@pento Actually, it was [35708]. Memories.

#9 @swissspidy
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 39347:

Embeds: Correctly remove security attribute from iframes in IE 10 and IE 11.

This was originally added in 4.4, but presumably broke with [35708], which prevented these browsers from actually reaching the relevant code section.
Let's make embeds work again in IE 10 and IE 11.

Fixes #38694.

Note: See TracTickets for help on using tickets.