Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#39011 closed defect (bug) (duplicate)

When updating posts, the initial version is not saved as a revision.

Reported by: georgestephanis's profile georgestephanis Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7
Component: Revisions Keywords: has-unit-tests
Focuses: Cc:

Description (last modified by georgestephanis)

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.

Attachments (1)

test_wp_first_revision_is_not_lost.diff (973 bytes) - added by georgestephanis 8 years ago.

Download all attachments as: .zip

Change History (4)

#1 @georgestephanis
8 years ago

  • Description modified (diff)

This ticket was mentioned in Slack in #core-customize by georgestephanis. View the logs.

8 years ago

#3 @georgestephanis
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #30854.

Note: See TracTickets for help on using tickets.