Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#6707 closed defect (bug) (fixed)

Your attempt to edit this post: "title" has failed.

Reported by: lloydbudd's profile lloydbudd Owned by: mdawaffe's profile mdawaffe
Milestone: 2.5.1 Priority: high
Severity: critical Version: 2.5
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

Your attempt to edit this post: "title" has failed
is the result after trying to Save a trivial post of title + paste some text into the post body. The title is saved, but not the body of the post.

I often do this to save a quote or URL for authoring a post later. If nothing else, having this simple test scenario work is essential for people to have confidence in WP.

ENV: Trunk / r7641 (2.6-bleeding)
Firefox/3.0b5

ADDITIONAL DETAILS

My guess is that it's a timing issue related to the trigger of the first autosave.

The please try again link is to 'wp-admin/post-new.php' which also doesn't inspire confidence.

I searched and there are a number of discussions on the forums with this error message. http://wordpress.org/support/topic/165717 includes the most insights and seems to suggest that there may be 3 possible issues here: conflict with plugins, byte order mark, or conflict with autosave.

Attachments (3)

6707.diff (2.1 KB) - added by mdawaffe 16 years ago.
6707.b.diff (1.5 KB) - added by mdawaffe 16 years ago.
better
6707.c.diff (2.9 KB) - added by mdawaffe 16 years ago.

Download all attachments as: .zip

Change History (13)

@mdawaffe
16 years ago

#1 @mdawaffe
16 years ago

  • Keywords has-patch commit added
  • Status changed from new to assigned

I think this patch solves the problem - it keeps the save and publish buttons from functioning until autosave is complete.

Makes for an annoying UI, but at least it works.

#2 @mdawaffe
16 years ago

This is how I was reproducing:

  1. Enter something into title.
  2. Leave the text cursor focused in the title box.
  3. With the mouse, click (the bottom of) the publish button many times rapidly.

#3 @ryan
16 years ago

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

(In [7788]) Disable buttons until autosave completes. Props mdawaffe. fixes #6707 for trunk

#4 @ryan
16 years ago

(In [7789]) Disable buttons until autosave completes. Props mdawaffe. fixes #6707 for 2.5

@mdawaffe
16 years ago

better

#5 @mdawaffe
16 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

6707.b.diff is better. jQuery was already passing a 2nd param to autosave_saved().

#6 @ryan
16 years ago

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

(In [7790]) Disable buttons until autosave completes. Props mdawaffe. fixes #6707 for trunk

#7 @ryan
16 years ago

(In [7791]) Disable buttons until autosave completes. Props mdawaffe. fixes #6707 for 2.5

#8 @mdawaffe
16 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Apparently this is still broken.

The problem with autosave is that if you click publish before the postid or nonce is updated, you get that "failed" error. We disable the buttons to prevent you from doing that, but they auto re-enable after 1 second. 1 second is no longer fast enough now that each autosave requires severeal ajax requests (I guess).

The attached bumps to 5 seconds, makes sure we manually re-enable the buttons on ajax success, and visually dims the disabled buttons for some UI feedback.

@mdawaffe
16 years ago

#9 @ryan
16 years ago

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

(In [7812]) Bump the autosave re-enable delay to 5 seconds, makes sure we manually re-enable the buttons on ajax success, and visually dim the disabled buttons for some UI feedback. Props mdawaffe. fixes #6707 for 2.5

#10 @ryan
16 years ago

(In [7813]) Bump the autosave re-enable delay to 5 seconds, makes sure we manually re-enable the buttons on ajax success, and visually dim the disabled buttons for some UI feedback. Props mdawaffe. fixes #6707 for trunk

Note: See TracTickets for help on using tickets.