WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#3379 closed defect (bug) (fixed)

Autosave during Save or Publish click results in duplicate

Reported by: foolswisdom Owned by: andy
Milestone: 2.1 Priority: normal
Severity: critical Version: 2.1
Component: Administration Keywords: autosave has-patch
Focuses: Cc:

Description

Autosave during Save or Publish click results in duplicate

ENV: WP trunk r4511
Visual editor disabled b/c of unrelated testing

The current very short autosave interval 'autosave_interval', '16' makes it easy to demonstrate the bug creating multiple drafts or a draft and a published post by clicking either Save or Publish while "Saving ..." is shown left of those buttons.

ACTUAL RESULT
Extra draft copy of the post

EXPECTED RESULT
Obvious.

Attachments (1)

autosave-me.diff (3.4 KB) - added by andy 8 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 @Viper007Bond9 years ago

If a solution can't be found behind the scenes, then a solution would be to disable the Save and Publish buttons while a save is in progress.

comment:2 @ryan9 years ago

[4512] changes the interval to 2 minutes.

This problem is usually seen when the server is experiencing a slowdown or having DB problems. Autosave send the save but we don't get a post ID back. So, we don't realize the save went through and we do another draft.

comment:3 @ryan9 years ago

Also, [4507] should disable the buttons during autosave. That might be enough to close out this issue.

comment:4 @foolswisdom9 years ago

[4507] does not seem to work as I was already at r4511 . I have tried again now and able to duplicate the previous buggy behavior.

comment:5 @andy8 years ago

  • Status changed from new to assigned

Issue with autosave occurring after button click is solved; patch forthcoming.

Issue with button click occurring during autosave remains to be solved; working on it now.

comment:6 @andy8 years ago

[4507] handles first issue.

@andy8 years ago

comment:7 @andy8 years ago

  • Keywords has-patch added; save draft saving removed

attachment autosave-me.diff prevents clicks during autosave and fixes invisible message issue from [3870]

comment:8 @ryan8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [4614]) Autosave fix up for duplicate drafts from andy. fixes #3379

Note: See TracTickets for help on using tickets.