Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#38694 closed defect (bug) (fixed)

Embeds not working in IE 11

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

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 10 years ago.
Chrome view vs. IE 11 view.
38694.diff (903 bytes ) - added by swissspidy 10 years ago.

Download all attachments as: .zip

Change History (11)

@Fencer04
10 years ago

Chrome view vs. IE 11 view.

#1 @swissspidy
10 years ago

  • Description modified (diff)
  • Summary oEmbed from Wordpress Post doesn't have correct style in IE11oEmbed 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 10 years ago by swissspidy (previous) (diff)

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


10 years ago

#3 @swissspidy
10 years ago

  • Version trunk

@swissspidy
10 years ago

#4 @swissspidy
10 years ago

  • Component Bundled ThemeEmbeds
  • Focuses javascript added
  • Keywords has-patch added
  • Milestone Awaiting Review4.8
  • Summary oEmbed from WordPress Post doesn't have correct style in IE11Embeds not working in IE 11
  • Version4.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
10 years ago

  • Keywords commit added
  • Owner set to swissspidy
  • Status newassigned

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
10 years ago

  • Milestone 4.84.7

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


10 years ago

#8 @swissspidy
10 years ago

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

#9 @swissspidy
10 years ago

  • Resolutionfixed
  • Status assignedclosed

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.