Opened 15 years ago
Closed 15 years ago
#11145 closed defect (bug) (fixed)
No gallery tab after upload if post hasn't been saved yet
Reported by: | yoavf | Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | major | Version: | 2.8 |
Component: | Gallery | Keywords: | needs-patch featured |
Focuses: | Cc: |
Description
Uploading a few pictures to an unsaved post fails to load a proper gallery tab:
Steps to reproduce:
- Create a new post
- Do not save, do not enter a title
- Upload a few images
- Click save changes
You'll get a non functioning gallery tab, like this one:
http://skitch.com/yoavf/n8127/add-new-post-on-off-wordpress
Change History (15)
#4
follow-up:
↓ 5
@
15 years ago
- Cc jeffstieler added
What is the correct course of action to fix this?
I see a few ways of dealing with this:
- Autosave just a post ID upon entering the media uploader so there is a valid parent post.
- Show a warning to the user upon entering media uploader when there is no post ID, that the media they upload at that point will not have an associated post, and patch get_media_items() to deal with invalid post IDs.
- Disallow uploading media to a post without an autosave.
#5
in reply to:
↑ 4
@
15 years ago
Replying to jeffstieler:
What is the correct course of action to fix this?
see also #9471
Imo, the correct approach is to immediately assign a uuid to drafts. and since we're now requiring mysql 4.1, we can.
the upload button should then pass the uuid instead of the post_id. and if anything is uploaded we create the post on the fly is no post exists with the same uuid.
#7
@
15 years ago
- Keywords needs-patch added
Reproduced. Buggy behaviour confirmed.
Better hope this time a fix is propper.
#8
@
15 years ago
After doing the test and then looking into #11524 I realized that these images do not even appear in the Media Library, not even unattached. This is getting really esoteric. Others who are willing to reproduce should test if the images do actually exist afterwards in the media library.
#9
@
15 years ago
Tested 2.9.1-RC1.
In a blank post, the image uploader appears normally. I added 5 photos, clicked Save All Changes in the uploader, which then failed to close and looked a lot like OP's screenshot. I then clicked on Save Draft and was sent straight to the Edit Posts screen. Nothing was saved for the post. The 5 images do appear in the Media Library, unattached.
#11
@
15 years ago
- Version changed from 2.9 to 2.8
Denis mentioned this was not a 2.9 regression, and I was able to reproduce the same bug in 2.8.4.
Possibly related: #9471