[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
Fri Jun 26 13:44:09 GMT 2009


#9471: Attachments uploaded before post is saved or autosaved get 0 (zero) for
post_parent (instead of temp_id value)
---------------------------------+------------------------------------------
 Reporter:  aesqe                |        Type:  defect (bug)
   Status:  new                  |    Priority:  normal      
Milestone:  2.8.1                |   Component:  Autosave    
  Version:  2.8                  |    Severity:  major       
 Keywords:  needs-patch blocker  |  
---------------------------------+------------------------------------------

Comment(by Denis-de-Bernardy):

 No no, it would be the post_guid. The latter needs to be unique anyway. It
 currently contains the url of the post, as it would appear with no fancy
 urls. It could just as well contain a UUID (see #6492).

 It's not safe to pre-assign a numerical ID to a post, but it's perfectly
 safe to pre-assign a UUID. Instead of passing a $temp_ID around, we'd pass
 a $post_guid. Using the $post_guid, we get the ID (creating the post on
 the fly if needs be).

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


More information about the wp-trac mailing list