Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#23900 closed defect (bug) (fixed)

Post format image ID corrupted when updating post

Reported by: johnbillion's profile johnbillion Owned by: helen's profile helen
Milestone: 3.6 Priority: normal
Severity: major Version: 3.6
Component: Post Formats Keywords: has-patch commit
Focuses: Cc:

Description

Steps to reproduce:

  1. Create an 'Image' format post, give it an image and save the post.
  2. Save the post again, with or without changing anything.
  3. Observe the image is broken.

Attachments (3)

23900.patch (826 bytes) - added by johnbillion 12 years ago.
23900.diff (965 bytes) - added by wonderboymusic 12 years ago.
23900.2.diff (1.5 KB) - added by helen 12 years ago.

Download all attachments as: .zip

Change History (8)

@johnbillion
12 years ago

#1 @johnbillion
12 years ago

  • Keywords has-patch dev-feedback added

The attached patch fixes the core issue, however it looks like there is some (redundant?) code in there that refers to an 'Image URL', which the post formats UI is not currently using. Might need to be looked at by someone more familiar with the post formats UI.

#2 @wonderboymusic
12 years ago

  • Keywords commit added; dev-feedback removed
  • Milestone changed from Awaiting Review to 3.6

yep - that was leftover from when it was a URL

@helen
12 years ago

#3 @helen
12 years ago

absint() would give us 0 if the value is empty.

#4 @helen
12 years ago

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

In 23874:

Since post format meta for images now takes an attachment ID only, make sure we label it appropriately and don't do things like esc_url() the value. fixes #23900.

#5 @SergeyBiryukov
12 years ago

In 23878:

Use correct escaping function. see #23900.

Note: See TracTickets for help on using tickets.