#6657 closed defect (bug) (fixed)
Uploader Gallery tab is empty if draft post has not been saved
| Reported by: | tellyworth | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.5.1 |
| Component: | General | Version: | 2.5 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.