[wp-trac] Re: [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 Jun 29 22:28:35 GMT 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.1      
Component:  Media         |     Version:  2.8        
 Severity:  blocker       |    Keywords:  needs-patch
--------------------------+-------------------------------------------------

Comment(by scribu):

 Replying to [comment:30 Denis-de-Bernardy]:
 > Actually, the ticket is all about drafts.

 For clarity, it's about the transition from status 'new' to status
 'draft'.

 > Disable javascript, double shift-click the new post button, so as to get
 the same temp ID on separate posts; open the uploader in a new tab each.
 Save all four in a very short lapse of time to get a race condition, and
 see how it goes with your patch on a remote server (localhost will likely
 work fine no matter what).

 > With the UUID approach I'm suggesting, I'm sure it'll work, since the
 two posts will have two separate UUIDs. With your approach, I think it
 should as well, since the logic behind would be mostly the same, and the
 odds are tiny to get a race condition indeed. But there still is a risk.

 I openened two tabs with the Add New panel and I did get the same temp id.

 Maybe this should addressed in a separate ticket?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9471#comment:32>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list