WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 23 months ago

Last modified 23 months ago

#24235 closed defect (bug) (invalid)

Post Formats: Externally linked audio files don't show in Audio Posts

Reported by: ipstenu Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.6
Component: Post Formats Keywords: has-patch
Focuses: Cc:

Description

I'm not 100% sure this is Twenty Thirteen, but it works on Twenty Twelve.

On Twenty Thirteen, instead of embedding the audio, it shows the shortcode only if the audio is external. If it's loaded from inside the media library, it's fine.

See here: http://test.ipstenu.org/audio-test.2013/

Attachments (1)

24235.diff (1.0 KB) - added by kovshenin 2 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 @JustinSainton2 years ago

  • Summary changed from Twenty Thirteen: Enternally linked audio files don't show in Audio Posts to Twenty Thirteen: Internally linked audio files don't show in Audio Posts

comment:2 @SergeyBiryukov2 years ago

  • Summary changed from Twenty Thirteen: Internally linked audio files don't show in Audio Posts to Twenty Thirteen: Externally linked audio files don't show in Audio Posts

comment:3 @SergeyBiryukov2 years ago

[24083] triggered this, but the changeset looks correct.

Shortcodes are only inserted for internal audio files:
http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/post-formats.php?rev=24098#L122

WP_Embed::autoembed() is called for external ones.

If you remove the shortcode and insert just the file URL, the player should appear.

I've spent some time recently on this issue and thought it was working as intended after all, so I didn't file a ticket. On second thought, the shortcode should probably work for external files too.

comment:4 @ipstenu2 years ago

The shortcode does work for external files, actually.

it doesn't work on Twenty Thirteen ONLY when you've put an external file in the audio ... box.

1) Make a post in the Audio Post Format
2) Paste the external URL into the box for "Audio embed code or URL"
3) Post
4) Post shows the shortcode

On the other hand, if I use the shortcode, or the file URL, in the context of a regular post, it works fine.

comment:5 @SergeyBiryukov2 years ago

Yes, I'm talking about the audio box too.

I've mixed up "shortcode" and "URL" in my comment. It should read as:

If you remove the file URL and insert a shortcode with the same external file, the player should appear.

So, the issue is that external files are not embedded by URL, only via a shortcode, but the label above the box doesn't make it clear.

comment:6 @sami.keijonen2 years ago

  • Cc sami.keijonen added

And it's not just Twenty13. I could replicate this with my theme also.

comment:7 @nphaskins2 years ago

When I posted this bug on the forum yesterday, I also mentioned that the same issue is happening with a video post. Both Audio/Video posts has separate file URL's, both went south on Beta2.

comment:8 @obenland2 years ago

  • Component changed from Bundled Theme to Post Formats
  • Summary changed from Twenty Thirteen: Externally linked audio files don't show in Audio Posts to Post Formats: Externally linked audio files don't show in Audio Posts

comment:10 @SergeyBiryukov2 years ago

  • Milestone changed from Awaiting Review to 3.6

@kovshenin2 years ago

comment:11 @kovshenin2 years ago

  • Keywords has-patch added

For the post format compat code this isn't an issue since it's scheduled at an earlier priority (7) and do_shortcode then picks that up at priority 11 at the_content. That's why you can't reproduce this in Twenty Twelve.

The structured code, however, doesn't run do_shortcode and relies on autoembed for external links which can in fact produce a shortcode since audio and video are registered embed handlers. Running the result from autoembed through shortcodes again should do the trick. See 24235.diff.

comment:12 @wonderboymusic23 months ago

  • Milestone 3.6 deleted
  • Resolution set to invalid
  • Status changed from new to closed

RIP PF

Note: See TracTickets for help on using tickets.