Page MenuHomePhabricator

confusing error message when uploading a file with filename is not allowed: "This title contains some undesirable characters. Please remove them."
Closed, ResolvedPublic

Description

I tried to upload an image with the name:

זהבה%20001[1].jpg

I got the following error:

The filename is not allowed.

though I know what is the problem with the file name, a new user might not know, and won't be able to proceed as this error doesn't give any hint how to fix the error.

compare to the ole tool message:

The filename "זהבה%20001-1-.jpg" contains characters that are not allowed in page titles. Please rename the file and try uploading it again.


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=46995

Details

Reference
bz38303

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:05 AM
bzimport added a project: UploadWizard.
bzimport set Reference to bz38303.
bzimport added a subscriber: Unknown Object (MLST).

It may be better still to specify which characters are invalid...

And when auto-generated names turn out to be invalid, something's wrong. :) We should make sure the auto name is always valid or else clearly make it easy to fix.

(In reply to comment #1)

It may be better still to specify which characters are invalid...

That looks like another feature request, in the meanwhile matanya's suggestion could be implemented, but I'm not sure that "characters that are not allowed" is the best, given it's not only about characters but also sequences of characters/other regexes.

You now have no feedback. Instead your proposed title is automatically 'cleansed' and you have no feedback that your title got changed until after the real upload was executed.

Also not really ideal I think...

*** Bug 43009 has been marked as a duplicate of this bug. ***

Ok, the issue as originally reported is resolved -- the original filename is automatically converted to a suggested filename that removes the '[' and ']' chars, and you don't get a weird error message if you forget to customize the filename.

Resolving as fixed. If there remain concerns about what happens if you then type in a name that's not a valid title or file, please open a separate bug for that.