Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#30835 closed defect (bug) (fixed)

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

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

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

  • Component EditorMedia
  • 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
12 years ago

  • Milestone Awaiting Review4.2

#3 @wonderboymusic
12 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
12 years ago

Why does embed require post, anyway?

#5 @iseulde
12 years ago

It relies on cache bound to a post ID.

#6 @wonderboymusic
12 years ago

  • Resolutionfixed
  • Status newclosed

Fixed in [31201].

Note: See TracTickets for help on using tickets.