Page MenuHomePhabricator

"undefined is not a function" in mw.UploadWizardDetails.js:1637 when uploading a deleted file in UploadWizard
Closed, ResolvedPublic

Description

Trying to upload the attached ogg file in UW, always leads to :

Error:https://bits.wikimedia.org/commons.wikimedia.org/load.php?debug=false&lang=en&modules=ext.uploadWizard&skin=vector&version=20150414T031148Z&* at line 0: Script error.

Event Timeline

Matanya raised the priority of this task from to Needs Triage.
Matanya updated the task description. (Show Details)
Matanya added a project: Multimedia.
Matanya subscribed.

When trying to upload, I get "This file was previously uploaded to this wiki, but later deleted." (in step 3) and a JS error:

Uncaught TypeError: undefined is not a function mw.UploadWizardDetails.js:1637
mw.UploadWizardDetails.handleSubmitResult mw.UploadWizardDetails.js:1637
mw.UploadWizardDetails.submit.details.upload.api.postWithEditToken.then.details.upload.state mw.UploadWizardDetails.js:1515 
...

Also, complete UX fail: there is no link to the deleted file or any other useful information, and no Next button or any other way to proceed or restart.

@Tgr I don't think linking to the deleted file would help anything, because you couldn't change the fact that it existed and was deleted. Really this falls under the "we should be able to ignore warnings" banner, but that's not on the docket right now.

As for the undefined error, should be a relatively quick fix I think?

Tgr renamed this task from failed to upload file due to an error to "undefined is not a function" in mw.UploadWizardDetails.js:1637 when uploading a deleted file in UploadWizard.Apr 14 2015, 10:06 PM
Tgr set Security to None.
Tgr removed a subscriber: MarkTraceur.

Yeah, T48741 is part of the problem, but more information about the deleted file would help the uploader figure out whether there is some reason the file cannot be uploaded (such as a non-obvious copyroght problem).

Change 204169 had a related patch set uploaded (by Gergő Tisza):
Fix type in promise handling

https://gerrit.wikimedia.org/r/204169

Change 204169 merged by jenkins-bot:
Fix type in promise handling

https://gerrit.wikimedia.org/r/204169

Tgr claimed this task.