[wp-trac] [WordPress Trac] #39011: When updating posts, the initial version is not saved as a revision.

WordPress Trac noreply at wordpress.org
Thu Dec 1 19:45:29 UTC 2016


#39011: When updating posts, the initial version is not saved as a revision.
-----------------------------+------------------------------
 Reporter:  georgestephanis  |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Revisions        |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-unit-tests   |     Focuses:
-----------------------------+------------------------------
Description changed by georgestephanis:

Old description:

> Unit test attached.

New description:

 When you save a post, then update it, the initial version isn't saved.

 This is often not seen, because when calling `get_default_post_to_edit()`
 with true as the second parameter, an empty post is created in the db, and
 that not being seen after the fact is hardly missed.

 However, if `wp_insert_post()` is called directly, the initial content
 currently gets lost.

 Unit test attached.

--

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


More information about the wp-trac mailing list