WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6707 closed defect (bug) (fixed)

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

Reported by: lloydbudd Owned by: 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 6 years ago.
6707.b.diff (1.5 KB) - added by mdawaffe 6 years ago.
better
6707.c.diff (2.9 KB) - added by mdawaffe 6 years ago.

Download all attachments as: .zip

Change History (13)

mdawaffe6 years ago

comment:1 mdawaffe6 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.

comment:2 mdawaffe6 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.

comment:3 ryan6 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

comment:4 ryan6 years ago

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

mdawaffe6 years ago

better

comment:5 mdawaffe6 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().

comment:6 ryan6 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

comment:7 ryan6 years ago

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

comment:8 mdawaffe6 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.

mdawaffe6 years ago

comment:9 ryan6 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

comment:10 ryan6 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.