[wp-trac] [WordPress Trac] #30854: `wp_insert_post` doesn't save revision for new published post

WordPress Trac noreply at wordpress.org
Fri May 21 19:57:29 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.8
Component:  Revisions                 |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by adamsilverstein):

 > By just adding a filter to when a post gets the publish status, would
 this not be limiting the fix to new posts, not existing published ones?

 Right, this would only solve the case for newly (programmatically)
 published posts.

 > Cross referencing a bbPress ticket here
 (https://bbpress.trac.wordpress.org/ticket/3389), which is a big scenario
 which needs to account for existing content as well.

 > The current behavior is that the first edit of an entry in a custom post
 type overwrites the initial post content entirely in the revision history,
 and then creates an autosave, completely removing any knowledge of the
 very first post made.


 Can you test this patch with bbPress to see if it fixes the issue you
 linked?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/30854#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list