Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#23879 closed defect (bug) (fixed)

Media post formats look at attachments before content, resulting in duplication

Reported by: markjaquith's profile markjaquith Owned by: markjaquith's profile markjaquith
Milestone: 3.6 Priority: high
Severity: major Version: 3.6
Component: Post Formats Keywords:
Focuses: Cc:

Description

If you attach a media file to an audio/video post and then embed it in the content, the file will be grabbed from the first attachment first. Without touching the content. So then you get duplication if you're using the_video() say... the_video() will output the video, but the video won't be removed from the content, since that's not how it was grabbed.

The fix there is to look in the content first, and only fall back to grabbing the first attachment as a method of last resort.

Change History (1)

#1 @markjaquith
12 years ago

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

In 23840:

Move the "look for the first media attachment" code below the "look
in the post content for media" code, so that it is the method of last
resort. This way, if you attach AND embed media, you won't get duplication.

fixes #23879

Note: See TracTickets for help on using tickets.