[wp-trac] [WordPress Trac] #30691: Removing a featured image does not remove the 'post_parent' value - reproducible

WordPress Trac noreply at wordpress.org
Fri Feb 27 05:33:46 UTC 2015


#30691: Removing a featured image does not remove the 'post_parent' value -
reproducible
--------------------------+------------------------------
 Reporter:  juggledad     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  4.0.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by knutsp):

 Until the parent definition of a media attachment is completely redisigned
 or removed, yes this seems to be by design.

 Such parent, as it is, means either uploaded to, once used as featured
 image for or was the first attachment for the post.

 Practically, the parent of an attachment is not very useful to determine
 current usage of an attachment.

 Either WordPress should aim to detect the addition and removal of an
 attachment from the post content, or the parent field should not be used
 at all. Setting the parent when uploded does not guarantee it's actually
 being used in that post. You can insert it, delete it and later use it in
 antoher post. It's still connected to the post it was first uploaded to.

 The rule for a featured image just follows the same path.

 Current internal rule seems to be: Set the parent whenever an attachment
 can be connected to a post, and never remove it later. Changing this for
 featured images and not for inline images doesn't make it more useful.

 * Stop assuming a value in the parent field of an attachment tells you
 anything about current state.
 * Start a general discussion on the use of the parent field for
 attachments. Maybe clarify documentation further?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30691#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list