[wp-trac] [WordPress Trac] #49532: Clicking "preview" multiple times on a post causes an identical autosave revision to be created and destroyed repeatedly
WordPress Trac
noreply at wordpress.org
Tue Jul 4 08:17:43 UTC 2023
#49532: Clicking "preview" multiple times on a post causes an identical autosave
revision to be created and destroyed repeatedly
-------------------------------------------------+-------------------------
Reporter: inwerpsel | Owner:
| adamsilverstein
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.2
Component: Revisions | Version: 5.4
Severity: normal | Resolution: fixed
Keywords: has-patch needs-testing dev- | Focuses: rest-api,
feedback has-unit-tests commit | performance
-------------------------------------------------+-------------------------
Comment (by Mamaduka):
Hi, @adamsilverstein
I think r55154 introduced a regression with the post-thumbnail previews.
If I preview a published post and the only change is the post thumbnail,
it's not reflected in the preview. The preview works if you change the
title or content.
My guess why it's happening:
Now that we bailout early from creating an autosave, the `$post->ID !=
$post_id` comparison in `_wp_preview_post_thumbnail_filter` will be
`false`, when previewing the post thumbnail only changes.
== How to reproduce ==
1. Edit an already published post.
2. Change only the post-thumbnail and click preview.
3. Notice that the preview displays an old thumbnail.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49532#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list