UploadWizard generates wikitext like {{83|...}} (with different numbers) instead of {{en|...}} in file descriptions.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Release | thcipriani | T170632 1.30.0-wmf.14 deployment blockers | ||
Resolved | matmarex | T173522 UploadWizard generates wikitext like '{{83|...}}' (with different numbers) instead of '{{en|...}}' in file descriptions |
Event Timeline
Change 372417 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/UploadWizard@master] Preserve array keys (language keys) when sorting the language dropdown
Change 372417 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@master] Preserve array keys (language keys) when sorting the language dropdown
After this is deployed, we'll need to find and fix the broken uploads. I will be doing that.
I posted a quick notification about it: https://commons.wikimedia.org/wiki/Commons:Village_pump#.7B.7B83.7C.E2.80.A6.7D.7D_and_similar_broken_templates_in_UploadWizard_uploads
Change 372419 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/UploadWizard@wmf/1.30.0-wmf.14] Preserve array keys (language keys) when sorting the language dropdown
Change 372419 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@wmf/1.30.0-wmf.14] Preserve array keys (language keys) when sorting the language dropdown
Mentioned in SAL (#wikimedia-operations) [2017-08-17T18:03:14Z] <thcipriani@tin> Synchronized php-1.30.0-wmf.14/extensions/UploadWizard/UploadWizard.config.php: SWAT: [[gerrit:372419|Preserve array keys (language keys) when sorting the language dropdown]] T173522 (duration: 00m 51s)
Yes, fixed and deployed.
I still need to clean up the broken wikitext pages, but that is not a deployment blocker.
There seem to be only three legitimate templates on Commons with potentially confusing names:
select page_title from page where page_namespace=10 and page_title rlike '^[0-9]+$'
- https://commons.wikimedia.org/wiki/Template:0
- Since '0' would be the first language on the list, this could only end up being used for some fairly rare languages with names starting with 'A' (e.g. Abkhazian in the English localisation), or if the user chose the first entry from the list without reading it for some reason. Still, this might have to be checked by hand. Starting from the end of https://commons.wikimedia.org/w/index.php?title=Special:WhatLinksHere/Template:0&namespace=6&limit=5000&from=60258200 (currently "File:1260Pulilan Bulacan Landmarks Road Constructions 47.jpg").
- https://commons.wikimedia.org/wiki/Template:2014
- https://commons.wikimedia.org/wiki/Template:2257
- They are not a problem – there are only 356 languages on the list so these could not have been generated.
Excluding those, we only get 240 results. I'll go through them with something semiautomatic (AWB or something) and change them to use {{en}} or {{unknown language}}.
select page_title, tl_title from templatelinks left join page on tl_from=page_id where tl_namespace=10 and (tl_title like '1%' -- This silly condition makes MySQL use indices better and run faster or tl_title like '2%' or tl_title like '3%' or tl_title like '4%' or tl_title like '5%' or tl_title like '6%' or tl_title like '7%' or tl_title like '8%' or tl_title like '9%') and tl_title rlike '^[1-9]+$' and tl_from_namespace=6 and tl_title < 356 order by tl_title;
I've done the cleanup this morning. Ended up editing 486 pages. Many were already cleaned up by conscientious editors, some were false positives (broken syntax for coordinates etc. from old edits).
(You might see fewer edits in my contributions, since a few of them already have {{delete}} templates etc. and will probably soon be deleted.)