Page MenuHomePhabricator

TypeError: mw.UploadWizard.config.licenses[defaultLicense] is undefined
Closed, InvalidPublic

Description

I'm trying to "skip" the choosing of a license when uploading files and found the following piece of code in the README:

$wgUploadWizardConfig = array(
    'licensing' => array(
            'ownWorkDefault' => 'own',
            'ownWork' => array(
                'type' => 'or',
                'template' => 'licensing', // this adds a link to Template:Licensing to the file info page
                'licenses' => array(
                     'generic',
                )
            ),
    ),
);

Unfortunately this results in the error above in the javascript-console after choosing an image and clicking on "next".

Using MediaWiki 1.23.13 and Upload Wizard 1.4.0

Event Timeline

Restricted Application added subscribers: Zppix, Steinsplitter, Aklapper. · View Herald Transcript
matmarex subscribed.

I think that option is simply not supported in your version of UploadWizard, sorry. It was added only recently (T46682).

The next release coming in a couple of weeks (UploadWizard 1.5.0 / MediaWiki 1.27) will include it. You could also try applying the patch 19b2b709e6cb3635d1bf8ee045f108bd3ebdfd92 to your version.