Page MenuHomePhabricator

UploadCampaigns -- setting a new default license
Closed, ResolvedPublic

Description

Author: neilk

Description:
There seem to be a few problems with the Upload Campaign licenses:

1 - If you choose a license as "default" but it isn't in the set of non-default licenses, then the submit button appears not to work.

The reason why is that the default choice is implemented by selecting (behind the scenes) the option in the list of non-default choices. So, if you do this:

Default license: A       
Non-default licenses: B, C, D

It doesn't work. If you switch the view to the non-default licenses, then you'll see the red error message asking you to please select one.

But if you do this:

Default license: A       
Non-default licenses: A, B, C, D

It should work.

There is some attempt at dealing with this situation in the code but it would be better if it was just impossible for this to happen.

2 - For reasons I don't undertand, when we deployed it live, I couldn't make a campaign change the default license to anything but CC-BY-SA-3.0. The campaign config is stored correctly; something else is interfering. This triggers the bug described above.

I did not see this behavior on testwiki. This is CRUCIAL to fix for WikiLovesMonuments.

3 - If the user tries to upload multiple files, they do have the option of giving them different licenses. In this situation, there is a license widget for every upload. The preference of which licenses to show (own work, not own work, or both) does not seem to carry through here.


Version: unspecified
Severity: normal

Details

Reference
bz30620

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 11:47 PM
bzimport added a project: UploadWizard.
bzimport set Reference to bz30620.

neilk wrote:

This is the config in the deployment equivalent of LocalSettings. I don't think the stickiness of the CC-BY-SA-3.0 license is related, but just in case:

if ( $wmgUseUploadWizard ) {
         require_once( "$IP/extensions/UploadWizard/UploadWizard.php" );
         $wgUploadStashScalerBaseUrl = "$urlprotocol//upload.wikimedia.org/$site/$lang/thumb/temp";
         $wgUploadWizardConfig = array(
                 # 'debug' => true,
                 'disableResourceLoader' => false,
                 'autoCategory' => 'Uploaded with UploadWizard',
                 // If Special:UploadWizard again experiences unexplained slowness loading JavaScript (spinner on intial load spinning forever)
                 // set fallbackToAltUploadForm to true.
                 'fallbackToAltUploadForm' => false, # Set by neilk, 2011-05-17
                 'altUploadForm' => 'Special:Upload', # Set by demon, 2011-05-10 per neilk
         );
         if ( $wgDBname == 'testwiki' ) {
                 $wgUploadWizardConfig['feedbackPage'] = 'Prototype_upload_wizard_feedback';
                 $wgUploadWizardConfig['altUploadForm'] = 'Special:Upload';
                 $wgUploadWizardConfig["missingCategoriesWikiText"] = '<p><span class="errorbox"><b>Hey, no categories?</b></span></p>';
                 unset( $wgUploadWizardConfig['fallbackToAltUploadForm'] );
         } else if ( $wgDBname == 'commonswiki' ) {
                 $wgUploadWizardConfig['feedbackPage'] = 'Commons:Prototype_upload_wizard_feedback';
                 $wgUploadWizardConfig['altUploadForm'] = 'Commons:Upload';
                 $wgUploadWizardConfig["missingCategoriesWikiText"] = "{{subst:unc}}";
         }
 }

Point 2 fixed by r95726. At least the campaign related part. The auto selection of the license is still failing often, as there are a whole bunch of licenses which have a template associated with them different then their name, which the JS for some reason requires. I'll also take a look at that I guess.

Point 1 (which I meant to refer to in my previous comment, not point 2) fully fixed by r95727; that was easy :)

I cannot reproduce point 2 locally, will look into it further tomorrow.

I cannot reproduce point 2 on my local wiki, on commons prototype or commons itself, and no one complained about it not working, which would have happened if it was broken on commons, so I'm guessing this issue is invalid.

Gilles raised the priority of this task from High to Unbreak Now!.Dec 4 2014, 10:19 AM
Gilles added a project: Multimedia.
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to High.Dec 4 2014, 11:22 AM