Wikipedia talk:File upload wizard

Page contents not supported in other languages.
Page semi-protected
From Wikipedia, the free encyclopedia

Cannot upload

When I click on the non-free upload button, I am redirected back to this page and never offered the upload form. Same result on Chrome. Android Firefox and Android Chrome, Samsung Galaxy S22 5G. Pingnova (talk) 01:32, 23 September 2023 (UTC)Reply[reply]

Hmm, I'm experiencing the same thing. Presumably there is some recent change that is causing this. Anyone able to pinpoint? {{u|Sdkb}}talk 03:08, 23 September 2023 (UTC)Reply[reply]
It seems like the Please explain what exact purpose this file will serve in the article. box was broken at some point. I don't see any recent edits to the js or css. The only recent edit is by Izno Jo-Jo Eumerus (talk) 07:21, 23 September 2023 (UTC)Reply[reply]

New description not saved when overwriting a file

When uploading a file with the same name as an existing file, and choosing the option "Yes, I want to overwrite the existing file, and I will use this wizard to add a new description and new source information for it", the new description and other information you provide is not saved. The file is still uploaded, and everything looks fine, but your input is lost.

There's an error message in the browser console: Syntax error, unrecognized expression: #TargetForm .[name="text"]. WMF error logging indicates that this affected at least 8 upload attempts in the last 90 days [1] (this link requires NDA, sorry), older data isn't available.

To fix it, please replace:

                  text   : ($('#TargetForm .[name="text"]')[0]).value


                  text   : ($('#TargetForm [name="text"]')[0]).value

The mistake was introduced in 2012 in this edit: [2] but the code worked until the jQuery 1.8 upgrade later that year [3]. Afterwards the same problem was corrected in this script in other places [4] [5], but as this feature is used more rarely, it slipped through.

I couldn't find any bug report about this anywhere, and it has been broken for over 10 years, so… maybe also consider whether this feature is really required? Matma Rex talk 19:08, 30 September 2023 (UTC)Reply[reply]

 Donexaosflux Talk 01:35, 1 October 2023 (UTC)Reply[reply]

Use AJAX instead of <iframe> in the script

The use of <iframe> in this script requires Wikipedia to use a certain less secure configuration (see T131183 for details). We no longer support old web browsers that required this approach (the script does not even load). I have prepared a new version that uses AJAX instead: User:Matma Rex/MediaWiki:FileUploadWizard.js.

It's a larger change, so before I put an {{Edit fully-protected}} here, it'd be good for someone to review it: compare changes. Thanks. Matma Rex talk 20:12, 30 September 2023 (UTC)Reply[reply]

@Future Perfect at Sunrise As the original author, any chance you'd like to have a look at these changes? Matma Rex talk 14:05, 2 October 2023 (UTC)Reply[reply]