-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when uploading not sent back to the user in the front-end #103
Comments
Also, I have this error message that is not relayed to the front-end, but even if it was, I don't understand what’s the problem with the file name…
That being written, intuitively, Wikimedia Commons doesn't seems to like chevrons ( Regards, Antoine |
So, for the second problem, I figured out. It was the use of non-breakable spaces that are often used in French. Regards, Antoine |
Commons disallows non-printing characters in the filename. IIRC the validation of this is all handled in FileNameScrutinizer which reflects the default values of wgLegalTitleChars. [but it's not a very transparent regexp] That doesn't undermine the problem raised here of surfacing the errors in the frontend =) |
The problem of surfacing the errors in the frontend should be addressed by OpenRefine/OpenRefine#6555, although I did not test it specifically for media files upload. I wonder if @antoine2711 or @Vesihiisi would be interested in trying it out? |
@lokal-profil @antoine2711 I have tested my PR OpenRefine/OpenRefine#6555 with Commons upload and made some tweaks to improve the UX there. See the screenshots there. Any feedback welcome. |
I’m waiting for the next version that can load the Commons extension. Regards, Antoine |
@antoine2711 there is a new release for the Commons extension which should work with OpenRefine 3.8 and the development version of OpenRefine (master branch) |
I took the latest OR snapshot (#2442) and tried uploading a file with a tab (0x09) in the name. Some thoughts on the experience:
Again, if I didn't know about non-printable characters, I wouldn't be able to guess the reason for the error. I guess that's the raw error returned by the API. I think the pain point is the fact that I was allowed to start uploading the file in the first place. |
We used to have this warning with the highest severity level ("Critical") which prevents the user from doing the upload, but because our regular expression catching invalid characters had false positives (flagging characters which were actually allowed, OpenRefine/OpenRefine#5656) we changed it to "Warning" so that the user is still able to attempt the upload (OpenRefine/OpenRefine#6227). We can of course revert this move, or somehow find a more reliable source of information for which characters are allowed in Commons filenames. Highlighting the special characters (such as your tab character) makes sense in any case. |
The idea is that it's at least something they can include in their report when asking for help (without having to check the server logs). If you have ideas of how to improve it, I am all ears. We could add some logic to translate specific MediaWiki error messages to a different format so they can be more easily understood by the user, but aiming to cover all possible MediaWiki errors is beyond reach I would say. |
@wetneb Found at the end of https://commons.wikimedia.org/wiki/Commons:File_naming#Language-specific_guidelines
Looks like MediaWiki itself has restrictions on filenames as seen in the paragraph above. But hard to find out WHICH and WHERE...
Since Commons uses the same underlying technology as Mediawiki itself... I read that it sometimes depends on which extension is actually used that enables a mass upload API seems important, but more important seems to be the backend database chosen where the last line of filename technical restrictions lies from what I read on the Mediawiki file uploads page? But I think this is close to the right place in their source (someone might have to ask on Telegram): But @Vesihiisi is actually getting the Using that and poking around more, brought me to this page: https://www.mediawiki.org/wiki/API:Upload
|
The Gerrit issue https://gerrit.wikimedia.org/r/c/mediawiki/core/+/942710 where the configuration options for the forbidden characters were deprecated in Mediawiki 1.41+ has some interesting reading about Illegal File Chars, and links to the wikitech-l mailing list issue which is very interesting reading and points to a core problem: https://lists.wikimedia.org/hyperkitty/list/[email protected]/thread/ASODV6622T4YUAY3JO5ZVBL3B5ZQDX2U/ |
I have this error when uploading:
But I get nothing in the front-end.
Regards,
Antoine
The text was updated successfully, but these errors were encountered: