WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#10704 closed enhancement (fixed)

Prevent logout before post save from destroying your changes

Reported by: markjaquith Owned by: azaozz
Milestone: 2.9 Priority: normal
Severity: major Version: 2.8.4
Component: Autosave Keywords:
Focuses: Cc:

Description

Current: If you get logged out of WordPress due to cookie timeout, accidental logout in another window, etc, and then you try to save a post with a bunch of changes you will get booted to the login screen and upon logging in, your changes will be gone.

Better: Changes will be saved through the login session OR you'll be intercepted on the login screen when you try to save and be given a chance to do an XHR login.

Change History (2)

comment:1 azaozz5 years ago

There is one hour grace period for AJAX and POST requests so this should be pretty rare. We could pass on the $_POST through the login screens but if the user makes a mistake we will have to pass it on again, 3 times, or maybe 5?

Another option is to check how long until the cookie expires when loading the edit page and open new window asking the user to login again when that is about to happen. Of course that would only work when JS is enabled. Still think this is the better option than passing the POST around for not logged-in users. It would interrupt the user with something like: "Your session has expired. Please log in again." followed by the login form.

comment:2 azaozz5 years ago

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

(In [12021]) Show the login form in a popup when autosave hits the login grace period, fixes #10704

Note: See TracTickets for help on using tickets.