[wp-trac] [WordPress Trac] #23013: Gallery images don't display when original post associated with image is trashed

WordPress Trac noreply at wordpress.org
Sat Nov 8 18:14:38 UTC 2025


#23013: Gallery images don't display when original post associated with image is
trashed
--------------------------+------------------------
 Reporter:  nmoinvaz      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Gallery       |     Version:  3.5
 Severity:  normal        |  Resolution:  duplicate
 Keywords:                |     Focuses:
--------------------------+------------------------

Comment (by sarapalmer2352):

 I tracked down the issue query.php around ~ line 2700 where it does a
 check to see if the the attachment is public/trashed. When viewing post B
 it instantly gets the attachment's post_parent which is now trashed.

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


More information about the wp-trac mailing list