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

WordPress Trac noreply at wordpress.org
Tue Nov 9 21:45:09 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                     |
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 > Applied patch from PR 1336 and it does create appropriate revisions for
 _new_ topics that area created, but as indicated in my initial reply, it
 does not account for _existing_ posts, which is part of the bigger issue
 here.

 @Clorith - Ah, I think I see what you are saying, although it does feel
 like a bit of an edge case.

 You might be able to fix this in bbPress with some existing hooks, eg copy
 the content to a revision on that first update if you know it is missing
 because a new topic is used?

 I feel like the current patch still addresses the bug as originally
 reported by @JamesDiGioia:

 **`wp_insert_post` doesn't save revision for new published post
 **

 So let's get this fix in as is, it solves a long standing issue with this
 "original revision" missing.

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


More information about the wp-trac mailing list