Page MenuHomePhabricator

A bad filename should be changed silently instead of stopping the upload with "unknown-warning"
Closed, ResolvedPublic

Description

When the filename on the local computer has an invalid/bad character (like a leading space in my case) the UW stops the upload with a non helpful "unknown-warning".

The old upload form shows at least the better message

'badfilename' => 'Filename has been changed to "$1".',

and I can retry with the changed filename.

I think the UW should change the filename silently and continue with the upload, maybe notifying the user in the last step about the changed filename.


Version: master
Severity: normal

Details

Reference
bz39220

Event Timeline

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

Hi!

Recently, a patch to MediaWiki core [0] changed the behavior of API warnings. We now get those at the first step, even if we don't handle them necessarily.

Could you try to reproduce this bug, and let us know if it still occurs? If so, the solution would likely be very different from before this patch.

It looks like the deployment window might have been before you reported the bug, but I'm not sure. I just got the first report of it being fixed this morning, so I'm trying to confirm all of these bugs.

[0] https://gerrit.wikimedia.org/r/#/c/9261/

Thanks!

(In reply to comment #1)

Could you try to reproduce this bug, and let us know if it still occurs? If so,
the solution would likely be very different from before this patch.

I can reproduce this bug on commons.wikimedia.org, tested today. No change in behavior :-(

I have also encountered this bug today, but with a message: "Error: http://bits.wikimedia.org/commons.wikimedia.org/load.php?debug=false&lang=en&modules=ext.uploadWizard&skin=vector&version=20120818T022835Z&* at line 42: InvalidCharacterError: String contains an invalid character."

I agree with Raymond here - the UploadWizard should automatically change the name of the file and continue with the upload instead of stopping it with such an error message.

Still a problem. The issue here is upload titles.

mw.UploadWizardUpload.js should properly ignore the 'badfilename' warning
Test case. Create a file with in the filename the character '['

When using a destination name with this character, you have no errors and the character is automatically stripped from the title. However you get no feedback of this while you type, it happens automagically when you press 'next'

Merged, so we should have this fixed in master. If it's not fixed in master (and be sure that you're testing on master), reopen.

This was reopened, without explanation.... Can someone tell me what the behavior is that they have verified is not working, so that it can be fixed ?

Gilles triaged this task as Unbreak Now! priority.Dec 4 2014, 10:10 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Needs Triage.Dec 4 2014, 11:20 AM