WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 3 months ago

#42092 reviewing defect (bug)

Autosave immediately before a full save inserts a revision with no changes

Reported by: johnbillion Owned by: adamsilverstein
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: Revisions Keywords: needs-patch
Focuses: Cc:
PR Number:

Description

Steps to reproduce:

  • Publish a post.
  • Make a change to the post content in the editor but do not save it.
  • Wait for an autosave to kick in.
  • Save the post.

Visit the Revisions screen for the post and you'll see that the latest revision shows no changes. Clicking Previous takes you to the autosave and shows the change that ought to be present in the most recent revision.

Change History (5)

#1 @adamsilverstein
2 years ago

  • Keywords reporter-feedback added

As I follow it, this actually reflects the state of things as you created them:

After your sequence there would be three revisions:

  1. the original published post version
  2. the autosave with the changes
  3. the newly published version no changes here - changes were saved in the autosave

@johnbillion What were you expecting to see here? that the autosave would not show up in the revisions at all?

#2 @adamsilverstein
2 years ago

  • Owner set to adamsilverstein
  • Status changed from new to reviewing

#3 @johnbillion
2 years ago

  • Keywords reporter-feedback removed

With a published piece of content, an autosave is not reflected in the live post content.

The third item in your list above is a revision where nothing has been revised. IMO it either shouldn't be stored, or it should replace the autosave immediately before it.

PS this happens quite frequently on the make.w.org sites which is where I first noticed it.

This ticket was mentioned in Slack in #core by kadamwhite. View the logs.


3 months ago

#5 @adamsilverstein
3 months ago

The third item in your list above is a revision where nothing has been revised. IMO it either shouldn't be stored, or it should replace the autosave immediately before it.

@johnbillion - Maybe it makes sense to delete the autosave when a regular save completes?

Note: See TracTickets for help on using tickets.