Commons:Upload Wizard feedback/Archive/2016/04

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Archive This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page.

Upload Wizard fails to upload a single image

I was uploading some images using the Upload Wizard yesterday, and it was working just fine. A couple of hours later I tried to upload another image, but the procedure could not get past the last step even there were no errors displayed. After clicking on the NEXT button, it wouldn't publish the image. It just returned back to the Describe step, with no errors displayed, and this time without the NEXT button. The Upload Wizard got stuck in the last step, and no data were saved. I tried the Upload Wizard a few more times later on, but to no avail. I also tried another browser, but the problem remained. The browser doesn't seem to be an issue here. My understanding is that this has been happening to many others as well. It looks like an error handling issue. The program fails in the last step for some reason, but the error handling part of the program is not sophisticated enough to be able to catch it and display the error status code and the associated error message, and provide an option to recover from the failure. My-wiki-photos (talk) 23:00, 10 April 2016 (UTC)

I want to do a follow-up as I figured it out what was causing this problem. This needs to be fixed as soon as possible. I am certainly not the only one who experienced this kind of situation. It is indeed about poor error handling. I figured what was causing the problem when I tried to upload the image using the old basic form. Here's the screenshot: https://c2.staticflickr.com/2/1650/26360815785_55939bf5d7_o.jpg I immediately noticed that I was trying to use a filename that already existed. Then I asked myself why the Upload Wizard did not recognize and warn me about that as it did many times before. I think the reason is the file extension. The file uploaded earlier had a JPG extension (uppercase), while the new file with the same name had a jpg extension (lowercase). So, my guess is that the Upload Wizard was treating these files as if they had different names during the validation phase just because the extensions were different, while in fact it was the same file format, and it was the same filename. And, that's the very reason the program failed and got stuck in the last step with no errors displayed. So, validation of the destination filename needs to be fixed with respect to this kind of situation. My-wiki-photos (talk) 03:49, 11 April 2016 (UTC)

@My-wiki-photos: thanks for reporting. I've filed a bug report in phabricator: phab:T132356. Please feel free to edit that in case I've misunderstood something (you can use your Wikipedia/Commons username and password to log in at [1] by clicking the smaller "log in or register – Mediawiki" button below the "LDAP" login form). Keeping an eye on that bug would be a good idea as well, as developers might have questions. --El Grafo (talk) 16:37, 11 April 2016 (UTC)
@El Grafo: Your description of the problem is good. Thank you. Will keep an eye on it! My-wiki-photos (talk) 17:15, 11 April 2016 (UTC)
In addition, I assume a relational database is used, and how I see it the Upload Wizard most likely fails while trying to update the database when INSERT fails due to unique constraint, which in turn is not properly handled. In this case the last step must be avoided until proper validation is done, which is supposed to recognize duplicate values and allow for corrections before executing the last step. My-wiki-photos (talk) 05:25, 12 April 2016 (UTC)
@My-wiki-photos: Thanks for this bug report, I fixed the issue and the fix should be deployed to Commons this Wednesday, per the usual schedule. This was actually reported before as phab:T130242, but without reproduction steps and I couldn't find a way to reproduce myself until you pointed out the case issue, thank you! (The solution was actually a lot simpler – the problem was being recognized, but there was a bug in code showing the error message… ;) ) See the Phabricator task for more details. (Also, pinging people who reported this before with the good news: @Kerry Raymond, Delphi234:.) Matma Rex (talk) 17:57, 12 April 2016 (UTC)
@Matma Rex: You are very welcome. I'm glad I could help. My-wiki-photos (talk) 18:21, 12 April 2016 (UTC)