#10917 closed defect (bug) (fixed)
Uploads are not attached to a post when created using QuickPress
Reported by: | iwords | Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.8.4 |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description
It is impossible to attach a file or image to a post created using QuickPress on the Dashboard.
Since QuickPress doesn't have an autosave feature like the full-blown editor, a post ID isn't generated until the post is either saved or published - at which point the post's content is cleared from the QuickPress editor, so you can no longer attach a file to it anyway.
Currently, the only way to attach a file or image to a post written in QuickPress is to save it as a draft, then re-edit it using the full editor, which somewhat defeats the object of using QuickPress.
Just to clarify - you can upload images and insert them into the *body* of the post, but you can't upload images and have them stored as attachments using QuickPress at all.
Note: #8932 appears to report a similar issue, but was marked as a duplicate of #9471. I added my feedback to #9471 but was asked to open a new ticket.
Attachments (5)
Change History (18)
#2
in reply to:
↑ 1
@
14 years ago
Replying to nacin:
Is this still current?
I've confirmed this is still not working correctly. I'll look at it tonight or tomorrow.
#4
@
14 years ago
- Keywords has-patch added
10917.patch solves the problem. We create now an auto-draft and as a result we get an ID which we can use for get_upload_iframe_src().
#5
@
14 years ago
Do prevent that on each site load a new post_ID will be generated, I had the idea, to ajaxify the qickpress box.
If the box is closed or not activated there will be no new post_ID. If it's open there will be a new post_ID (auto-draft) and attachments works fine.
#6
@
14 years ago
Another option would be to save the post_ID as Transient, maybe for one day. If the auto-draft still exists use this otherwise create a new one.
#9
@
14 years ago
- Keywords ui-feedback removed
Added a patch which uses the Transient API to store the post_ID of the auto-draft. For example for two days.
#10
@
14 years ago
Patch looks interesting but is not multi-user safe.
I think you need to key the transient on something user specific as well as otherwise two users will end up playing with the same draft if your not careful.
#11
@
14 years ago
Oh, that's right. So instead of the transient we can save the id as an user option. So each user has now an own quick press auto-draft for maximal 7 days and also we didn't need to delete the post_id like I did it with transient.
Is this still current?