Page MenuHomePhabricator

Upload wizard on Commons fails to process uploads with the "description" field
Closed, ResolvedPublic

Description

Upload wizard fails when the upload link contains the "&description=" part and a non-empty image description is given. This affects all uploads related to Wiki Loves Monuments, where monument names and locations are added to the description. Here is an example of the upload link that fails to work:

http://commons.wikimedia.org/w/index.php?title=Special:UploadWizard&campaign=wlm-ru&id=5910051000&id2=&description=Transfiguration_Monastery&categories=Transfiguration%20Monastery%2C%20Solikamsk&uselang=ru

Event Timeline

Atsirlin raised the priority of this task from to Medium.
Atsirlin updated the task description. (Show Details)
Atsirlin added a project: UploadWizard.
Atsirlin subscribed.
Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald Transcript

Ouch, this is a regression from c339bb6e109dc0ee493292c0b91841faff7c033c, really sorry about that.

As a workaround, it works when you provide a 'descriptionlang' parameter too: https://commons.wikimedia.org/w/index.php?title=Special:UploadWizard&campaign=wlm-ru&id=5910051000&id2=&descriptionlang=ru&description=Transfiguration_Monastery&categories=Transfiguration%20Monastery%2C%20Solikamsk&uselang=ru

I'll get this fixed tomorrow.

matmarex raised the priority of this task from Medium to Unbreak Now!.
matmarex set Security to None.

Change 258767 had a related patch set uploaded (by Bartosz Dziewoński):
mw.UploadWizardDetails: Don't fail when 'description' is given, but 'descriptionlang' isn't

https://gerrit.wikimedia.org/r/258767

@matmarex: Thanks! Does it mean that &descriptionlang= will automatically generate the relevant language template? Currently, we add this template using the code in Campaign:wlm-ru? Which way is better?

I'm not sure what you mean. Setting "&descriptionlang=ru&description=Transfiguration_Monastery" will prefill the description fields to generate "{{ru|Transfiguration_Monastery}}" (but allowing the user to change the description text and language). I don't see where in https://commons.wikimedia.org/w/index.php?title=Campaign:wlm-ru&action=edit this is configured.

@matmarex: Yes, you are right, it is not there. However, &uselang=ru set Russian as default language, so that every description was processed as {{ru|description}} unless users opted for a different language. I guess that &descriptionlang= is redundant in this case

Change 258767 merged by jenkins-bot:
mw.UploadWizardDetails: Don't fail when 'description' is given, but 'descriptionlang' isn't

https://gerrit.wikimedia.org/r/258767

Change 259006 had a related patch set uploaded (by Thcipriani):
mw.UploadWizardDetails: Don't fail when 'description' is given, but 'descriptionlang' isn't

https://gerrit.wikimedia.org/r/259006

Change 259006 merged by jenkins-bot:
mw.UploadWizardDetails: Don't fail when 'description' is given, but 'descriptionlang' isn't

https://gerrit.wikimedia.org/r/259006

The fix has been deployed now. Thank you for the bug report!