#6657 closed defect (bug) (fixed)
Uploader Gallery tab is empty if draft post has not been saved
Reported by: | tellyworth | Owned by: | |
---|---|---|---|
Milestone: | 2.5.1 | Priority: | normal |
Severity: | normal | Version: | 2.5 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
- New Post
- Without entering a post title or text or anything else, click the Add An Image button
- Upload some images, but don't click Save or Insert
- 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)
Note: See
TracTickets for help on using
tickets.
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.