[wp-trac] [WordPress Trac] #40145: Revisions sent to trash never get deleted by Wordpress.

WordPress Trac noreply at wordpress.org
Mon Mar 13 17:55:07 UTC 2017


#40145: Revisions sent to trash never get deleted by Wordpress.
-------------------------------+-----------------------------
 Reporter:  programmin         |      Owner:
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  trunk
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 If you remove an autosave of a page like so:

 {{{#!php
 <?php
 $autosave = wp_get_post_autosave( id )
 wp_trash_post($autosave->ID);
 }}}

 it actually gets in the database such that it will never be removed, even
 if you empty trash of posts and pages later.

 You can see all the revisions it wants to leave forever with:


 {{{
 SELECT * FROM wordpress.wp_posts where post_status = 'trash' and post_type
 = 'revision' order by id desc;
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40145>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list