auto-drafts are improperly stored as the first revision
|Reported by:||nacin||Owned by:||nacin|
|Severity:||normal||Keywords:||has-patch commit dev-reviewed|
This came out of #22686 from maxcutler.
Steps to reproduce this bug:
- Create a post.
- Inspect its revisions. It should have two: [Current Revision] and one more. The earlier one is what would be listed in the meta box, so click it to see both.
- Compare [Current Revision] with the original revision. This "original revision" is actually timestamped with the moment the post screen was entered and the auto-draft was created.
In 3.4, the comparisons are identical. In 3.5, the original revision has a post title of "Auto Draft". This was likely the result of WP_Post (#21309).
Note if you entered content before autosaved fired, it does not appear in the original revision either way. Only the title.
In 3.5, we should try to replicate 3.4's behavior and copy the title over.
In 3.6, we should try to avoid the initial auto-draft-base revision from being stored. It is misleading, especially since an auto-draft may stick around for a few days before being used (either via an open tab or an ID held by QuickPress). A revision can only happen to a post once it is saved, and auto-drafts don't count.