Ticket #6707 (closed defect: fixed)

Opened 5 months ago

Last modified 4 months ago

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

Reported by: lloydbudd Assigned to: mdawaffe
Priority: high Milestone: 2.5.1
Component: General Version: 2.5
Severity: critical Keywords: has-patch commit
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

6707.diff (2.1 kB) - added by mdawaffe on 04/23/08 01:36:17.
6707.b.diff (1.5 kB) - added by mdawaffe on 04/23/08 02:15:16.
better
6707.c.diff (2.9 kB) - added by mdawaffe on 04/25/08 00:05:06.

Change History

04/23/08 01:36:17 changed by mdawaffe

  • attachment 6707.diff added.

04/23/08 01:37:10 changed by mdawaffe

  • keywords set to has-patch commit.
  • 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.

04/23/08 01:38:13 changed by mdawaffe

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.

04/23/08 01:56:00 changed by ryan

  • status changed from assigned to closed.
  • resolution set to fixed.

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

04/23/08 01:56:19 changed by ryan

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

04/23/08 02:15:16 changed by mdawaffe

  • attachment 6707.b.diff added.

better

04/23/08 02:15:49 changed by mdawaffe

  • status changed from closed to reopened.
  • resolution deleted.

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

04/23/08 02:22:57 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

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

04/23/08 02:23:08 changed by ryan

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

04/25/08 00:04:25 changed by mdawaffe

  • status changed from closed to reopened.
  • resolution deleted.

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.

04/25/08 00:05:06 changed by mdawaffe

  • attachment 6707.c.diff added.

04/25/08 00:32:16 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(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

04/25/08 00:32:30 changed by ryan

(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