Last modified: 2014-08-28 14:03:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71314, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69314 - Recover gracefully from session expiration
Recover gracefully from session expiration
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Translate (Other open bugs)
master
All All
: High major with 1 vote (vote)
: MW 1.24 version
Assigned To: Niklas Laxström
:
: 47184 48773 48775 (view as bug list)
Depends on: 41466
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-08 22:33 UTC by Niklas Laxström
Modified: 2014-08-28 14:03 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Niklas Laxström 2014-08-08 22:33:06 UTC
Currently if you lose session (get logged out) while having Special:Translate open, and then try to Translate a message, a following happens:

mw.api.post fails due to invalid token. It tries to re-fetch the token, which fails as well. It will then cache this error [1]. The translation will go to "unsaved" state, which does not have yellow highlight, so it is hard to spot. If you open such a message you will see that saving failed due to "Unknown error". 

[1] While debugging you wont see any ajax requests being made for saving. This confused me for a long while while debugging.

Suggested behavior as incremental improvements:
1. Those messages should get the "saving failed" label.
2. The error message should say that session has expired.
3. We should detect the situation and display a modal alert asking the user to log in another tab to prevent creating further unsaved work.
4. We should detect the situation and provide login via ajax and immediately retry saving the translation.
Comment 1 Niklas Laxström 2014-08-08 22:38:32 UTC
Marking as major due to data loss aspects. I believe this bug is the main cause for the occasional reports of data loss. Aiming to fix for MLEB 2014.08.
Comment 2 Nemo 2014-08-09 00:03:30 UTC
This is a duplicate though.
Comment 3 Nemo 2014-08-09 00:04:50 UTC
*** Bug 48775 has been marked as a duplicate of this bug. ***
Comment 4 Nemo 2014-08-09 00:05:15 UTC
*** Bug 48773 has been marked as a duplicate of this bug. ***
Comment 5 Nemo 2014-08-09 00:05:26 UTC
*** Bug 48657 has been marked as a duplicate of this bug. ***
Comment 6 Nemo 2014-08-09 00:05:43 UTC
*** Bug 47184 has been marked as a duplicate of this bug. ***
Comment 7 Nemo 2014-08-09 00:06:41 UTC
Comment 0 appears to span all cases covered by the 4 previous bug reports now merged into this.
Comment 8 MZMcBride 2014-08-09 00:27:59 UTC
(In reply to Nemo from comment #7)
> Comment 0 appears to span all cases covered by the 4 previous bug reports
> now merged into this.

I'm not sure one large bug makes more sense than four small bugs, especially when we have tracking bugs and the child bugs were already filed. But okay.
Comment 9 Niklas Laxström 2014-08-09 12:59:11 UTC
It helps me to have a concise plan and a goal. It's really just a one bug with multiple non-overlapping solutions to address it.
Comment 10 James Forrester 2014-08-09 13:21:48 UTC
Umm. Bug 48657 is about MediaWiki core's editing ability, and has nothing to do with the Translate extension. I'm restoring it as a blocker to this.
Comment 11 Gerrit Notification Bot 2014-08-15 10:04:15 UTC
Change 154245 had a related patch set uploaded by Nikerabbit:
Assert that user is logged in when saving

https://gerrit.wikimedia.org/r/154245
Comment 12 Gerrit Notification Bot 2014-08-15 10:04:21 UTC
Change 154246 had a related patch set uploaded by Nikerabbit:
Give yellow warning background to the status if saving failed

https://gerrit.wikimedia.org/r/154246
Comment 13 Gerrit Notification Bot 2014-08-15 10:04:26 UTC
Change 154248 had a related patch set uploaded by Nikerabbit:
Show an alert to the user if session has expired

https://gerrit.wikimedia.org/r/154248
Comment 14 Niklas Laxström 2014-08-15 10:09:16 UTC
The above three patches cover cases 1-3. We can still improve on 3 by providing a link. Implementing case 4 is tricky due to captchas etc.
Comment 15 Gerrit Notification Bot 2014-08-18 09:01:56 UTC
Change 154245 merged by jenkins-bot:
Assert that user is logged in when saving

https://gerrit.wikimedia.org/r/154245
Comment 16 Gerrit Notification Bot 2014-08-18 09:03:09 UTC
Change 154246 merged by jenkins-bot:
Give yellow warning background to the status if saving failed

https://gerrit.wikimedia.org/r/154246
Comment 17 Gerrit Notification Bot 2014-08-19 17:09:32 UTC
Change 154248 merged by jenkins-bot:
Show an alert to the user if session has expired

https://gerrit.wikimedia.org/r/154248
Comment 18 Gerrit Notification Bot 2014-08-25 12:13:52 UTC
Change 156098 had a related patch set uploaded by Nikerabbit:
Implement session expiry checking for proofread actions

https://gerrit.wikimedia.org/r/156098
Comment 19 Gerrit Notification Bot 2014-08-28 12:58:07 UTC
Change 156098 merged by jenkins-bot:
Implement session expiry checking for proofread actions

https://gerrit.wikimedia.org/r/156098
Comment 20 Niklas Laxström 2014-08-28 14:03:49 UTC
I have split the remaining part to bug 70122 as it has a blocker in core.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links