Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#37334 closed defect (bug) (fixed)

Embeds preview not working in the media modal

Reported by: swissspidy's profile swissspidy Owned by: ocean90's profile ocean90
Milestone: 4.6 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-screenshots has-patch
Focuses: javascript Cc:

Description

Not sure when it got broken, but noticed this while testing embeds for another ticket.

When embedding another WordPress site (or even the same site) and clicking on the pencil to edit the embed, the preview is not loaded correctly. Instead of hiding the <blockquote> and showing the <iframe>, it keeps displaying the <blockquote>. Works fine in the editor and on the front-end.

https://cldup.com/dUYYQt24tx.png

Attachments (1)

37334.diff (379 bytes) - added by swissspidy 8 years ago.

Download all attachments as: .zip

Change History (4)

@swissspidy
8 years ago

#1 @swissspidy
8 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Future Release to 4.6

37334.diff enqueues the wp-embed script when a new wp_editor() is instantiated and _WP_Editors::$has_medialib is true.

This fixes the preview inside the modal.

#2 @ocean90
8 years ago

  • Component changed from Embeds to Media

#3 @ocean90
8 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 38062:

Editor: Enqueue the wp-embed script to fix embed previews inside the media modal.

Props swissspidy.
Fixes #37334.

Note: See TracTickets for help on using tickets.