Ticket #6657 (closed defect (bug): fixed)

Opened 9 months ago

Last modified 9 months ago

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

Reported by: tellyworth Assigned to: anonymous
Priority: normal Milestone: 2.5.1
Component: General Version: 2.5
Severity: normal Keywords: has-patch
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

empty-gallery-tab-fix-r7638.patch (0.6 kB) - added by tellyworth on 04/10/08 03:10:02.

Change History

04/10/08 03:10:02 changed by tellyworth

  • attachment empty-gallery-tab-fix-r7638.patch added.

04/10/08 03:11:08 changed by tellyworth

  • keywords set to has-patch.

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.

04/14/08 16:30:12 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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

04/14/08 16:30:28 changed by ryan

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