Page MenuHomePhabricator

AJAX watch error fallback doesn't work
Closed, ResolvedPublic


Found while reviewing patch for bug 10387, triggered via bug 10396.

The AJAX watch/unwatch code is supposed to fallback to the traditional watch/unwatch link if the AJAX request doesn't work.

Unfortunately that fallback isn't actually working. This is usually hidden as failures are unlikely if the AJAX setup code determines that AJAX won't work, but a problem that prevents the request from working on the server end will leave it in failure mode.

The button changes to "watching..." but never changes back.

Error condition should be better detected, and the fallback mode used.

Version: 1.11.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:53 PM
bzimport set Reference to bz10397.
bzimport added a subscriber: Unknown Object (MLST).

Fixed in r23506.

It was only doing the fallback if the AJAX server code returned an <err#> response, which doesn't happen if things are fundamentally broken. :)

Now runs fallback for any unrecognized response.

alexsm333 wrote:

Comment: the script could also do fallback if there is no response at all (using already existing setTimeout function).