Page MenuHomePhabricator

Upload Wizard: Error fails indicating "undesirable characters" but does not indicate which characters this might be
Closed, ResolvedPublic

Description

User Story: I want to upload an file to commons using the UploadWizard

What happens: Using a file name like: Wikidatta Flyer for Developers Part 2/2 (OUTSIDE) , the user gets an error message: "This title contains some undesirable characters. Please remove them"
The user does not know which characters are undesirable. A long time computer user might infer that it is the best to go with ASCII, but many will not.

What should happen instead: Ideally, the error message should point out the "bad" characters that were used. As a generic alternative, the error message should state which characters are not allowed.

Event Timeline

Restricted Application added a project: Multimedia. · View Herald TranscriptJul 13 2016, 9:05 AM
Restricted Application added subscribers: Zppix, Poyekhali, Steinsplitter, Aklapper. · View Herald Transcript
matmarex triaged this task as Normal priority.
matmarex added a subscriber: matmarex.

The user does not know which characters are undesirable. A long time computer user might infer that it is the best to go with ASCII, but many will not.

That would actually be a wrong assumption. Most characters outside of ASCII are perfectly okay. But we disallow some characters inside ASCII. In this case, the problematic character is /.

Ideally, the error message should point out the "bad" characters that were used. As a generic alternative, the error message should state which characters are not allowed.

Hmm, we actually have a slightly more useful error message that is used when the problem is detected client-side (try e.g. inputting [ in the title field): "This title is invalid. Make sure to remove characters like square brackets, colons, comparison operators, pipes and curly brackets.". So the question is, why do we have a different one for invalid titles detected server-side, and why is a slash in the file name not rejected by the client-side checker.

related: T66366

It doesn't looked related to me. Did you want to mention a different task?

Restricted Application added a subscriber: Matanya. · View Herald TranscriptJul 18 2016, 10:16 PM
Jan_Dittrich updated the task description. (Show Details)Jul 19 2016, 6:46 AM

So the question is, why do we have a different one for invalid titles detected server-side, and why is a slash in the file name not rejected by the client-side checker.

makes sense.

related: T66366

It doesn't looked related to me. Did you want to mention a different task?

Yes, indeed, this is very much unrelated; If I wanted to paste a related there I forgot by now which one it was...

Change 300792 had a related patch set uploaded (by Bartosz Dziewoński):
mw.Title: Use $wgIllegalFileChars for file title checking

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

Change 300796 had a related patch set uploaded (by Bartosz Dziewoński):
uw.TitleDetailsWidget: Check for $wgIllegalFileChars client-side

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

Change 300799 had a related patch set uploaded (by Bartosz Dziewoński):
Improve errors about invalid filenames

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

Change 300792 merged by jenkins-bot:
mw.Title: Use $wgIllegalFileChars for file title checking

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

Change 300796 merged by jenkins-bot:
uw.TitleDetailsWidget: Check for $wgIllegalFileChars client-side

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

Change 300799 merged by jenkins-bot:
Improve errors about invalid filenames

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