Page MenuHomePhabricator

Cross-wiki upload tool errors display as raw JSON rather than a notice (in production)
Closed, ResolvedPublic8 Story Points

Description

I was trying to upload a file with an existing filename (to test the user-warning message).
The warning template is broken.

Unknown warning: "{"upload":{"result":"Warning","warnings":{"exists-normalized":"Pixies-Doolittle.png"},"filekey":"13x9lgznmpi4.6u1hq5.3099303.jpg","sessionkey":"13x9l

Additionally, I checked against a filename that is protected ("example"), and a filename that was previously deleted ("screenshot"), and those are both also broken.


(Firefox, Ubuntu. Tested at https://en.wikipedia.org/wiki/User:Quiddity_%28WMF%29/sandbox )

Details

Related Gerrit Patches:

Event Timeline

Quiddity created this task.Apr 3 2016, 12:48 PM
Restricted Application added a project: Multimedia. · View Herald TranscriptApr 3 2016, 12:48 PM
Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald Transcript
Jdforrester-WMF renamed this task from Upload wizard warning templates are broken to [Regression] Cross-wiki upload tool errors are broken in production.Apr 3 2016, 12:51 PM
Jdforrester-WMF triaged this task as Unbreak Now! priority.
Jdforrester-WMF removed a project: UploadWizard.
Jdforrester-WMF added subscribers: MarkTraceur, matmarex.
Restricted Application added a subscriber: Matanya. · View Herald TranscriptApr 3 2016, 12:51 PM

Define "broken"? I suppose they should have better error messages, and I think they used so, so that's possibly a regression. But it's mostly intentional that you can't upload new versions of previously existing files.

Jdforrester-WMF renamed this task from [Regression] Cross-wiki upload tool errors are broken in production to [Regression] Cross-wiki upload tool errors display as raw JSON rather than a notice (in production).Apr 3 2016, 12:59 PM
matmarex renamed this task from [Regression] Cross-wiki upload tool errors display as raw JSON rather than a notice (in production) to Cross-wiki upload tool errors display as raw JSON rather than a notice (in production).Apr 5 2016, 7:53 PM
matmarex lowered the priority of this task from Unbreak Now! to High.

This is not a regression, we just don't have any handling for these warnings ('exists-normalized' and 'was-deleted'), nor for the 'protectedpage' error. We have handling for 'exists' and 'duplicate-archive', which is what you should get most of the time.

Change 281741 had a related patch set uploaded (by Bartosz Dziewoński):
mw.Upload.BookletLayout: Handle additional warnings/errors

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

matmarex claimed this task.Apr 5 2016, 8:29 PM

Change 281741 merged by jenkins-bot:
mw.Upload.BookletLayout: Handle additional warnings/errors

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

matmarex closed this task as Resolved.Apr 6 2016, 11:34 AM
matmarex removed a project: Patch-For-Review.
Jdforrester-WMF set the point value for this task to 8.May 10 2016, 1:23 AM