﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
23434,post_parent update,reliability,,"I've tried to find similar tickets but was unsuccessful. So, I apologize if this is a duplicate.

Consider the following steps:

1. Upload an image A to the media library.
2. Create a new post P1 and insert the image A.
3. Create another post P2 and insert the image A.

The post_parent property of A will be set to the id of P1. But when adding the image to the post P2, no new post-entry for A with the post_parent-id of P2 is added to the wp_posts-table.

The effect of this is, while the image is properly displayed when the content of post P2 is rendered, code that retrieves images that are attached to P2 fails. For instance:

{{{
/* ... */
$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image' ) );
/* ... */
}}}",defect (bug),closed,normal,,Media,,normal,duplicate,,
