Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#6657 closed defect (bug) (fixed)

Uploader Gallery tab is empty if draft post has not been saved

Reported by: tellyworth's profile tellyworth Owned by:
Milestone: 2.5.1 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords: has-patch
Focuses: Cc:

Description

  1. New Post
  2. Without entering a post title or text or anything else, click the Add An Image button
  3. Upload some images, but don't click Save or Insert
  4. Click the Gallery tab

Expected: the gallery tab should list the images you just uploaded.

Actual: the gallery tab is empty except for a Save All Changes button.

Attachments (1)

empty-gallery-tab-fix-r7638.patch (638 bytes) - added by tellyworth 17 years ago.

Download all attachments as: .zip

Change History (4)

#1 @tellyworth
17 years ago

  • Keywords has-patch added

The bug is in the code at the top of get_media_items(). The code that fetches images there is conditional on get_post($post_id) - since the draft post has not yet been created, the conditional fails.

The patch fixes it. It appears not to break anything else but could use more regression testing.

#2 @ryan
17 years ago

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

(In [7650]) Fix image fetching in get_media_items(). Props tellyworth. fixes #6657 for 2.5

#3 @ryan
17 years ago

(In [7651]) Fix image fetching in get_media_items(). Props tellyworth. fixes #6657 for trunk

Note: See TracTickets for help on using tickets.