WordPress.org

Make WordPress Core

#37334 closed defect (bug) (fixed)

Embeds preview not working in the media modal

Reported by: swissspidy Owned by: 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 13 months ago.

Download all attachments as: .zip

Change History (4)

@swissspidy
13 months ago

#1 @swissspidy
13 months 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
12 months ago

  • Component changed from Embeds to Media

#3 @ocean90
12 months 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.