Page MenuHomePhabricator

Keep the edit in progress when the user logs in
Closed, ResolvedPublic

Description

I am editing an article on Wikipedia.
A warning tells me that I am not logged in and invites me to log in.
I click Se connecter, to log in.
I log in.

Expected result:
I am now logged in. I have my edit in progress. I can continue my edit.

Actual result:
I am now logged in. But Wikipedia has lost the edit I had started, and Wikipedia did not even warn me about that!

This is data loss.

This bad experience discourages the user from editing.

It would be very nice to correct this bug.

Thank you.

Nnemo

Event Timeline

Nnemo raised the priority of this task from to High.
Nnemo updated the task description. (Show Details)
Nnemo added a project: MediaWiki-General.
Nnemo subscribed.

How is this supposed to work technically?

Aklapper lowered the priority of this task from High to Lowest.Jun 16 2015, 2:30 PM
Aklapper set Security to None.

How about using local storage? The longest page on enwp is <10% of the space allowed on local storage at time of writing and it's likely to be gone in under a minute. It could potentially be reduced too depending on how substantial the changes are.

How about using local storage? The longest page on enwp is <10% of the space allowed on local storage at time of writing and it's likely to be gone in under a minute. It could potentially be reduced too depending on how substantial the changes are.

I think @onei has a very good idea.

Then, the development for local storage could be used as basis for other scenarios (crashes, browser misbehaviours…) where auto-saving-and-restoring are greatly needed. Say no to data loss!

Similar code used in Mozilla's kuma: https://github.com/mozilla/kuma/blob/master/media/js/wiki-edit.js#L559 (happened to spot the functionality while looking for soemthing else). Seems pretty simple to implement :)

A warning tells me that I am not logged in and invites me to log in.

What kind of warning? This one?

Screen Shot 2015-09-11 at 02.05.21.png (384×1 px, 107 KB)

I am now logged in. But Wikipedia has lost the edit I had started, and Wikipedia did not even warn me about that!

If you started making the edit (e.g. performed some action in the edit area by typing or removing text), and you click on a link or close the website, there will be automatically be a warning that tells you your work will not be saved.

Screen Shot 2015-09-11 at 02.07.59.png (580×1 px, 110 KB)

I agree saving it automatically would be very useful indeed. But I just want to make sure, did you not get this warning when you clicked the link?

Until there is an automatic drafting functionality, one possible work-around is to:

  • open the "Log in" link in a new window. Log in there and close it.
  • Go back to the original edit window you had open, click "Show preview". The preview will now use your new log-in account session and preserve the edit work you made so far (without needing to use the clipboard or copy the text yourself). You can then continue finishing the edit and save it with your logged-in account.

A warning tells me that I am not logged in and invites me to log in.

What kind of warning? This one?

Screen Shot 2015-09-11 at 02.05.21.png (384×1 px, 107 KB)

Yes, probably.

I am now logged in. But Wikipedia has lost the edit I had started, and Wikipedia did not even warn me about that!

If you started making the edit (e.g. performed some action in the edit area by typing or removing text), and you click on a link or close the website, there will be automatically be a warning that tells you your work will not be saved.

Screen Shot 2015-09-11 at 02.07.59.png (580×1 px, 110 KB)

I agree saving it automatically would be very useful indeed. But I just want to make sure, did you not get this warning when you clicked the link?

I did not get such warning. And now I reproduce the scenario and I do not get such warning.

A session at Wikimania this year discussed the use of time bound campaigns to drive new editors to contribute - and create an account.
After the session the conversation turned to how can we create a more engaging on-boarding process separate from campaigns. One idea was to improve the on-boarding process for folks who are new. Logged-out users who which to create an account and continue editing must leave their editing session and find their way back after creating an account. This can create more friction and reduce the number of successful accounts being created.

Allowing users to continue an edit session after logging in would be beneficial to new editors and existing editors who wish to switch from editing logged out (forgot to login, new or multiple devices, etc).

It's now nearly 9 years later, and I think the alert that appears when navigating away from an in-progress edit is pretty reliable. That seems to have been the main bug here (it's hard to know now why it wasn't appearing in some circumstances).

In addition, the Edit Recovery feature is being worked on, which will save the in-progress edit data to the browser's indexedDB storage. That can be tested now on some wikis (see T355548 for which).

My feeling is that this task can be closed as resolved now.

JWheeler-WMF claimed this task.
JWheeler-WMF subscribed.

Resolving task per @Samwilson 's recommendation