[wp-trac] [WordPress Trac] #40145: Revisions sent to trash never get deleted by WordPress
WordPress Trac
noreply at wordpress.org
Thu Aug 1 14:37:11 UTC 2019
#40145: Revisions sent to trash never get deleted by WordPress
-----------------------------------------+------------------------------
Reporter: programmin | Owner: adamsilverstein
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Revisions | Version:
Severity: minor | Resolution:
Keywords: has-patch reporter-feedback | Focuses:
-----------------------------------------+------------------------------
Changes (by adamsilverstein):
* keywords: has-patch => has-patch reporter-feedback
* owner: (none) => adamsilverstein
* status: new => assigned
* component: Posts, Post Types => Revisions
* severity: normal => minor
Comment:
Hello @Mista-Flo - thanks for the ping and the bug report.
I attempted to reproduce this and was unable to.
Here is what I tried (I am testing against trunk):
* Empty database and create a new post.
* Publish post, make some changes to trigger an autosave and exit the post
exit screen.
At this point I have three records in the database post table: one for the
post itself, one for a revision created of the initial save, and one
autosave
a[[Image(https://core.trac.wordpress.org/raw-
attachment/ticket/40145/Image%202019-08-01%20at%208.20.18%20AM.png)]]
The I opened wp-cli shell and issued the commands from the ticket
description:
`$autosave = wp_get_post_autosave( [post id] );`
`wp_trash_post($autosave->ID);`
Checking the database I see that the autosave record was removed:
[[Image(https://core.trac.wordpress.org/raw-
attachment/ticket/40145/Image%202019-08-01%20at%208.21.20%20AM.png)]]
I tried again with the ID of one of the revisions and again the record was
correctly deleted:
[[Image(https://core.trac.wordpress.org/raw-
attachment/ticket/40145/Image%202019-08-01%20at%208.21.40%20AM.png)]]
Perhaps I have missed some step to reproduce? What version of WordPress
are you using when you see this issue?
Can you please try again on your end first disabling all plugins and also
switching to a default theme like twentynineteen if possible to eliminate
the possibility that a plugin or theme code is affecting autosaves.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40145#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list