Last modified: 2013-04-17 22:38:11 UTC
This is a pathological case, but causes cryptic, poorly reported failure. If $wgFileExtensions contains a value in common with $wgFileBlacklist, UploadWizard refuses to upload files of any type. This happens because Setup.php executes $wgFileExtensions = array_diff ( $wgFileExtensions, $wgFileBlacklist ); and this creates an array with missing integer keys. This array is encoded for JavaScript by the Xml class as an Object rather than an Array, and the call to $j.inArray() that UploadWizard uses then fails on all files submitted. To fix this, either Setup.php should use array_values( array_diff( ... ) ), or else UploadWizard.config.php should say 'fileExtensions' => array_values($wgFileExtensions),
Created attachment 11753 [details] patch for UploadWizard.config.php
Thanks for the patch, you may also be interested in getting developer access[1] so you can get direct code review. Would you like to do that for this patch itself? [1]http://www.mediawiki.org/wiki/Developer_access
OK, but I don't know the protocol. Feel free to email me with instructions.
You will learn that mostly in the account creation process. Besides you might find http://www.mediawiki.org/wiki/Git/Workflow helpful.
OK. I did something that might be the right thing. https://gerrit.wikimedia.org/r/#/c/48092/
(In reply to comment #5) > OK. I did something that might be the right thing. > https://gerrit.wikimedia.org/r/#/c/48092/ That's the fastest someone has been with gerrit :)
2 hours to add bureaucracy to a 1-word patch is the fastest ever? Seems like a concern. Anyway, thanks for accepting the report and calling out for reviewers.
https://gerrit.wikimedia.org/r/#/c/50598/ now submitted, in response to comments on gerrit. This one adds array_values( ) to Setup.php, rather than to UploadWizard.config.php.
context for this bug report is at https://sourceforge.net/p/workingwiki/bugs/259 btw, though it's not necessary
Can we consider this fixed? and if so maybe abandon https://gerrit.wikimedia.org/r/#/c/48092/
Resolving since Gerrit change #50598 is now merged. In case it isn't solved yet, please reopen.
https://gerrit.wikimedia.org/r/48092 (Gerrit Change I46ff25baee72baafe0ff38d3e77fcb6a26f50090) | change ABANDONED [by Worden.lee]