Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#30835 closed defect (bug) (fixed)

[playlist] shortcode not rendered on editor instances not related post content

Reported by: marcochiesi's profile marcochiesi Owned by:
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.1
Component: Media Keywords:
Focuses: Cc:

Description

When using a wp_editor instance not related to a post (i.e. using the visual editor for widgets as provided by Black Studio TinyMCE plugin, the [playlist] shortcode is not rendered correctly inside the editor.
This depends on the function wp_ajax_parse_media_shortcode which checks for a valid post ID, but for such editor instances the post ID is set to 0 in the ajax call, so it returns false.

Change History (6)

#1 @iseulde
11 years ago

  • Component changed from Editor to Media
  • Focuses ui removed

Some media shortcodes rely on the post global, so I'm not sure what to do with this. @wonderboymusic? :)
Should these shortcodes work outside a post context?

#2 @wonderboymusic
11 years ago

  • Milestone changed from Awaiting Review to 4.2

#3 @wonderboymusic
11 years ago

In 31201:

In wp_ajax_parse_media_shortcode(), don't require a global $post for all passed shortcodes.

embed is the only shortcode that requires a post ID. This will allow MCE views to work for playlist, audio, and video outside of the Edit Post screen.

See #30835.

#4 @Funkatronic
11 years ago

Why does embed require post, anyway?

#5 @iseulde
11 years ago

It relies on cache bound to a post ID.

#6 @wonderboymusic
11 years ago

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

Fixed in [31201].

Note: See TracTickets for help on using tickets.