Page MenuHomePhabricator

Be more helpful when (un)watching via JavaScript fails due to invalid token
Closed, ResolvedPublic

Description

It just happened to me that unwatching a page failed, because the token changed for some reason. I just got an error message of the kind "something went wrong" which doesn't help normal users (I could look in the JS console to find out what went wrong). Even if this shouldn't happen too often, MW should be more helpful. Possible enhancements:

  • Add some hint how to fix it to the error message: "Reload the page and try again."
  • Unbind the AJAX watch things when an error occurs (the non-AJAX token will probably be invalid, too, so the user will need to confirm the action a second time).
  • Use action=tokens to get a new token and re-try automatically.

Version: 1.22.0
Severity: enhancement

Details

Reference
bz47916

Related Objects

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:26 AM
bzimport set Reference to bz47916.

Adding many blockers of bug 38638 to the list of "easy" bugs, to mark them as candidates for [[mw:Google Code-in]] tasks (gci2013). If you think this bug is not suitable, remove the keyword.

Steps to reproduce:

  1. Copy the URL to (un)watch a page
  2. Log out and log in again, or wait a certain number of hours/days
  3. Visit the URL

However, it would be better if you just gave us the exact message you saw. ;-) There are several token errors messages, IIRC.

This should no longer occur since bug 65157 was fixed, the watch star JavaScript now re-tries with a new token when the request fail, as per your suggestion #3.