Last modified: 2014-02-19 22:27:02 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 T60116, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58116 - [Preview] doesn't abort api requests in flight
[Preview] doesn't abort api requests in flight
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Flow (Other open bugs)
master
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-06 21:00 UTC by spage
Modified: 2014-02-19 22:27 UTC (History)
3 users (show)

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


Attachments

Description spage 2013-12-06 21:00:14 UTC
Parsoid was restarting and so [Preview] was slow and I clicked more than once. I noticed in Firebug that the api requests continued, several were in flight to preview the same post.

You can simulate this by adding
  sleep( rand( 0, 10 ) );
to execute() in includes/api/ApiParsoidUtilsFlow.php

then click [Preview] multiple times, then click Cancel.  All the preview requests continue.
It would be less server and client, especially when Parsoid is slow, if clicking Preview, Cancel, or Reply cancelled any existing  api.post() request for  preview of the same post, if any. You save the jqXHR from api.post(), and call abort() on it before sending the new one. (And in failure, check for data.status = 'abort' before alerting.)

The good news is it seems the client waits for the last jqXHR to arrive, so you never see a preview of an earlier state.
Comment 1 Bingle 2013-12-06 21:01:32 UTC
The WMF core features team tracks this bug on Mingle card https://mingle.corp.wikimedia.org/projects/flow/cards/596, but people from the community are welcome to contribute here and in Gerrit.

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


Navigation
Links