[wp-trac] [WordPress Trac] #30854: `wp_insert_post` doesn't save revision for new published post
WordPress Trac
noreply at wordpress.org
Sat Feb 6 10:13:51 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.7
Component: Revisions | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------------
Comment (by Mista-Flo):
Replying to [comment:17 adamsilverstein]:
> Excellent, thank you @Mista-Flo!
>
> @hellofromTonya testing by hand is tricky from the UI because this
ticket deals with a programmatic insertion of a post rather than one
created in the UI.
>
> One possible test would to try importing some posts using the WordPress
importer. After this patch, imported posts should get an initial revision,
better matching posts created in the UI (and something we worked around
recently in the revision screen). You will have to look in the DB to see
the difference though because we "fake" the initial revision on the
revisions screen when it is missing.
>
> A second test would be to review the bug fixed in
https://core.trac.wordpress.org/ticket/39032. The fix for that is now
reverted in the latest patch, because the new fix here corrects the issue.
>
btw, for the removal of #39032 I only removed it from the code, but I did
not remove the unit test of that ticket, should we do it as well?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30854#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list