Last modified: 2011-03-19 02:57:15 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 T28081, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26081 - Uploading a duplicate file causes spinner to spin forever
Uploading a duplicate file causes spinner to spin forever
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Neil Kandalgaonkar
:
: 26007 (view as bug list)
Depends on:
Blocks: 27260
  Show dependency treegraph
 
Reported: 2010-11-23 10:55 UTC by Roan Kattouw
Modified: 2011-03-19 02:57 UTC (History)
4 users (show)

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


Attachments

Description Roan Kattouw 2010-11-23 10:55:44 UTC
Uploading a file that already exists on the wiki causes the spinner to spin forever. The API request comes back with /something/ but Firebug is being a PITA and won't show me the response contents.

Observed on commons.prototype.wm.o/uwd
Comment 1 Roan Kattouw 2010-11-23 16:58:05 UTC
It just so happens that mw.iFrameTransport.js line 94 uses a temporary variable called json without declaring it, which results in it leaking into the global scope. This is bad style, but allowed me to get the server's response:

>>> json
"{ "upload": { "result": "Warning", "warnings": { "exists": "Badtoken.png" }, "sessionkey": "frex7j7se8avvfo2pmmt5t643h10zki" } } "
Comment 2 Roan Kattouw 2010-11-23 18:31:33 UTC
Upon casual reading of the code, it looks like mw.UploadWizard.js lines 229-233 seem to be the culprit, along with a comment acknowledging the issue.
Comment 3 Neil Kandalgaonkar 2010-11-24 00:47:39 UTC
*** Bug 26007 has been marked as a duplicate of this bug. ***
Comment 4 Ryan Kaldari 2011-01-28 02:18:43 UTC
I haven't looked at the code yet, but you can check if a file already exists on commons by running a hash check through the API. If ?action=query&list=allimages&aisha1=<imagehash> returns any matches, you can discard the upload and return an error message.
Comment 5 Neil Kandalgaonkar 2011-03-18 02:21:47 UTC
fixed in r84223
Comment 6 Neil Kandalgaonkar 2011-03-19 02:57:15 UTC
see above comment, fixed in r84223

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


Navigation
Links