https://bugzilla.wikimedia.org/show_bug.cgi?id=69314

            Bug ID: 69314
           Summary: Recover gracefully from session expiration
           Product: MediaWiki extensions
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Translate
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
       Web browser: ---
   Mobile Platform: ---

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to