[wp-trac] [WordPress Trac] #10642: Cant insert image galleries into new posts (same on wordpress.com)

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 18 15:57:26 UTC 2009


#10642: Cant insert image galleries into new posts (same on wordpress.com)
--------------------------+-------------------------------------------------
 Reporter:  kiprasm       |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  General       |     Version:  2.8.1     
 Severity:  major         |    Keywords:            
--------------------------+-------------------------------------------------
 I'm having a problem inserting image galeries into new posts. In fact,
 this problem is also visible on wordpress.com !

 The problem is: you can't insert images as a gallery to a new post,
 through Quick Press or Posts -> Add New
 You can only insert photos as single images, by pressing "Insert into
 Post".
 The source of the problem is (as i understand it), the fact that a new
 post, while it is not yet auto saved as a draft, it does not have an ID.
 So you can't attach new photos to it, because they need an ID of the post
 they are being attached to as their post_parent.

 It is clearly visible, through Posts -> Add New. Try to add photos as a
 gallery right after you open up that page, you wont be able to do it.
 After pressing "Save all changes" the content of the Media popup will be
 blank, instead of a new Gallery tab appearing.
 But, if you type in post title, then wait for the draft to be saved (you
 can know when it is saved when the line with the permalink appears right
 below the post title input), the media uploader will work as expected.

 This is also why, media inserting as a gallery always works for edited
 posts (because they are already saved, therefore always have an id), and
 why it never works for Quick Press (because a post added through it never
 has an ID, because it only gets it when saved, and after you save it you
 can only edit it through Posts -> Edit).

 Inserting images directly into the post (one by one, not as a gallery that
 is) works, because they are directly inserted into the post contents and
 are not saved separately, therefore they don't need a post_parent.

 My questions are:

     * Was this always the case? I mean was this problem introduced in 2.8
 or any other version ?
     * Is there any sane way to fix this?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10642>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list