[wp-trac] [WordPress Trac] #30854: `wp_insert_post` doesn't save revision for new published post
WordPress Trac
noreply at wordpress.org
Tue Nov 16 19:16:02 UTC 2021
#30854: `wp_insert_post` doesn't save revision for new published post
-------------------------------------------------+-------------------------
Reporter: JamesDiGioia | Owner:
| adamsilverstein
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.9
Component: Revisions | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests has- | Focuses:
testing-info needs-testing needs-dev-note |
-------------------------------------------------+-------------------------
Comment (by adamsilverstein):
@peterwilsoncc do you have additional questions about this change? Do you
have the time to give it a test? You shouldn't see any change in the
current behavior for revisions when using the WordPress UI. Eg, there
shouldn't be any new/additional crated revisions vs. before the patch.
The main thing this would effect is plugins that create new content, for
example a post duplication plugin, or a distribution plugin, or restoring
content from an XML export.
In these cases (unless the plugin manually created a revision), users
would not have to save their content twice before they could access the
revision screen, and there would be no revisions copy of the original
content state. After this patch, these posts will all have a revisions
versions that matches the original content, and you will see the revisions
screen link after a single update.
I don't think we ever fixed this for imports, so one way to test this (cc:
@hellofromTonya ) would be to use the export feature to export some posts
from a site, then import them into a site and edit a published imported
post. Try removing some content and updating. You will find that you can't
use revisions to go back to the original state before you removed the
content. if you make additional changes and save again, revisions will
appear, but the original state will be missing entirely.
This seems like a worthwhile fix for a longstanding issue that continues
to effect users. I'd still like to get it in for 5.9.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30854#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list