[wp-trac] [WordPress Trac] #9471: Attachments uploaded before post is saved or autosaved get 0 (zero) for post_parent (instead of temp_id value)
WordPress Trac
wp-trac at lists.automattic.com
Mon Aug 17 09:45:43 UTC 2009
#9471: Attachments uploaded before post is saved or autosaved get 0 (zero) for
post_parent (instead of temp_id value)
--------------------------+-------------------------------------------------
Reporter: aesqe | Owner: scribu
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 2.8.5
Component: Media | Version: 2.8
Severity: blocker | Keywords: has-patch needs-testing
--------------------------+-------------------------------------------------
Comment(by azaozz):
This is possible but all has to be done while opening the uploader (saving
the post as draft, reloading the page or updating the ID with AJAX and
then opening the uploader). It may be done with js but is not
straightforward. And this should happen on the dashboard too for
QuickPress.
Was thinking of more generalized solution, perhaps having an empty "auto-
draft" for each user that will be opened when visiting the write screen or
the dashboard. If the user doesn't save the draft it will be reused next
time. When it gets saved or published (i.e. doesn't exist) new one would
be created again. That way all negative post IDs will be obsolete.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9471#comment:40>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list