Page MenuHomePhabricator

TypeError: undefined is not an object (evaluating title.replace) between Deed and Details steps
Closed, ResolvedPublic

Description

https://usercontent.irccloud-cdn.com/file/1GuKGk61/image.PNG

Revi reports four instances (probably one for each file) of this error between the Deed and Details steps of UW. @matmarex says there was a spike in these errors starting on the 17th. Maybe a recently merged patch that has a call to an mw.Title method using undefined instead of a string.

Event Timeline

Restricted Application added a project: Multimedia. · View Herald TranscriptNov 21 2016, 5:13 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
revi added a subscriber: revi.Nov 21 2016, 5:13 PM
Restricted Application added a subscriber: Matanya. · View Herald TranscriptNov 21 2016, 5:13 PM
matmarex updated the task description. (Show Details)Nov 21 2016, 5:17 PM
revi added a comment.Nov 21 2016, 5:23 PM

For your information, I was trying to upload 2 files. (Also said on wikimedia-commons@freenode but relaying here so it doesn't get lost)

@revi If you try to upload the same files again, does the same problem happen? If yes, can you upload them here, so that we can reproduce the issue? (Use the icon on the comment field toolbar.)

revi added a comment.Nov 21 2016, 5:47 PM

And yes, it does occur across the browsers. (Tried on Safari first, then Chrome for iOS.)

matmarex claimed this task.Nov 21 2016, 6:24 PM

My crystal ball told me that you're selecting the "The license is described by the following wikitext" option on the "Release rights" step (actually, that is the only place where we call mw.Title that has changed recently, so it was an obvious place to look). It seems we don't correctly guard against poorly written scripts polluting global prototypes there, which is what causes this exception.

Change 322709 had a related patch set uploaded (by Bartosz Dziewoński):
mw.UploadWizardLicenseInput: Correct unguarded for...in

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

Change 322709 merged by jenkins-bot:
mw.UploadWizardLicenseInput: Correct unguarded for...in

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

Change 322711 had a related patch set uploaded (by Bartosz Dziewoński):
.jshintrc: Disallow unguarded for...in

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

Change 322892 had a related patch set uploaded (by Bartosz Dziewoński):
mw.UploadWizardLicenseInput: Correct unguarded for...in

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

Change 322892 merged by jenkins-bot:
mw.UploadWizardLicenseInput: Correct unguarded for...in

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

Mentioned in SAL (#wikimedia-operations) [2016-11-22T14:42:43Z] <hashar@tin> Synchronized php-1.29.0-wmf.3/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js: mw.UploadWizardLicenseInput: Correct unguarded for...in - T151220 (duration: 00m 49s)

matmarex closed this task as Resolved.Nov 22 2016, 2:48 PM
matmarex removed a project: Patch-For-Review.

Fixed and deployed.

Change 322711 merged by jenkins-bot:
.jshintrc: Disallow unguarded for...in

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