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

image.PNG (1×750 px, 206 KB)

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 subscriber: Aklapper. · View Herald Transcript

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.)

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

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 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