Page MenuHomePhabricator

Remove handling Scribunto modules with errors
Open, Needs TriagePublic

Description

In 9b0060c89ac2, the possibility to save Scribunto modules with errors was removed, however, the code handling erroneous modules was kept to account for already saved ones. This was in September 2014, 2.5 years after the initial commit and 7.5 years ago. Since then, there’s a tracking category that is empty on all (or at least almost all) wikis, but needs to be localized, people looking at Special:TrackingCategories (including me) wonder how could modules end up here, and makes the code base larger than necessary. I think it’s time to kill it. Of course, before that, we should make sure that this category is indeed empty on all Wikimedia wikis and also advise third-party wikis’ administrators to do so.

Event Timeline

Krinkle added a subscriber: Krinkle.

per mw:Maintainers, tagging by hand due to lack of Herald rule.

I wrote a Pywikibot script F35046157 to query all category members across Wikimedia (should I commit it? I wrote it to handle any tracking category, not just this one, maybe it would be useful for others as well), and I’m surprised how many broken pages still exist.

$ ./pwb.py globaltrackinglist scribunto-module-with-errors-category
[… not interesting status updates omitted …]
[[sv:Modul:Infoboxtest]]
[[arz:وحدة:Br separated entries/doc]]
[[arz:وحدة:Category handler/config/doc]]
[[arz:وحدة:Check for unknown parameters/doc]]
[[arz:وحدة:Convert/doc]]
[[arz:وحدة:Documentation/doc]]
[[arz:وحدة:Hatnote/doc]]
[[arz:وحدة:HtmlBuilder/doc]]
[[arz:وحدة:Infobox/doc]]
[[arz:وحدة:Namespace detect/doc]]
[[arz:وحدة:Navbar/doc]]
[[arz:وحدة:Protection banner/doc]]
[[arz:وحدة:ScribuntoUnit/doc]]
[[arz:وحدة:String/doc]]
[[eu:Modulu:AsteSantua/doc]]
[[eu:Modulu:Comma separated entries/doc]]
[[el:Module:Page/doc]]
[[sl:Modul:Banana/doc]]
[[sl:Modul:InfopoljeSlika/doc]]
[[ka:მოდული:InfoboxImage/doc]]
[[ta:Module:Convert/documentation/conversion data/doc]]
[[ta:Module:Convert/documentation/conversion data/doc/introduction]]
[[ml:ഘടകം:BaseConvert/doc]]
[[ml:ഘടകം:HtmlBuilder/doc]]
[[ml:ഘടകം:String/doc]]
[[gu:ઢાંચો:Arguments]]
[[gu:ઢાંચો:Message box]]
[[ps:Module:Arguments/doc]]
[[ps:Module:Category handler/doc]]
[[ps:Module:Coordinates/doc]]
[[ps:Module:Location map/data/Afghanistan Kabul/doc]]
[[ps:Module:Location map/data/Afghanistan Kandahar/doc]]
[[ps:Module:Location map/data/Afghanistan/doc]]
[[ps:Module:Location map/data/Balochistan Pakistan/doc]]
[[ps:Module:Location map/data/Belgium/doc]]
[[ps:Module:Location map/data/Canada/doc]]
[[ps:Module:Location map/data/Croatia/doc]]
[[ps:Module:Location map/data/England Midlands/doc]]
[[ps:Module:Location map/data/France/doc]]
[[ps:Module:Location map/data/India Delhi/doc]]
[[ps:Module:Location map/data/Iran/doc]]
[[ps:Module:Location map/data/Nepal/doc]]
[[ps:Module:Location map/data/Pakistan/doc]]
[[ps:Module:Location map/data/USA New York/doc]]
[[ps:Module:Location map/data/USA Washington, D.C. central/doc]]
[[ps:Module:Location map/data/USA/doc]]
[[ps:Module:No globals/doc]]
[[ps:Module:Taliban insurgency detailed map/doc]]
[[ps:Module:Unsubst/doc]]
[[ps:Module:Wikidata2/doc]]
[[ps:Module:Wikidata2/otheruse/doc]]
[[ps:Module:WikidataAlder/doc]]
[[ps:Module:Yesno/doc]]
[[roa-tara:Modulo:Categorie qualità/doc]]
[[dty:मोड्युल:Citation/CS1/sandbox/styles.css]]
[[wikivoyage:el:Module:LinkPhone/doc]]
[[wiktionary:so:Module:utilities/documentation]]
57 page(s) found in total
6 wiki(s) had issues: ['wikimania:team', 'wikimediachapter:ec', 'wikimediachapter:id-internal', 'wikimediachapter:il', 'wikimediachapter:uk', 'wikimediachapter:ve']

Are the content model of many of these messed up?

https://el.wikipedia.org/w/index.php?title=Module:Page/doc&action=edit

You cannot edit this revision because its content model is Scribunto, which differs from the current content model of the page wikitext.

I've fixed many (most?) of these by changing the content model to the right one, or to text and back to wikitext.

Can you please re-run the script and see what still needs fixing?

15 pages left on public wikis (I can’t check the six non-public wikis listed at the bottom of the above console output):

The Gujarati ones seem to be modules accidentally imported into the template namespace and subsequently overwritten with template content (but without changing the content model), while the Egyptian Arabic and Slovene are misnamed module documentation (in Egyptian Arabic the suffix should be /شرح, while in Slovene it should be /dok). It looks like Scribunto didn’t handle the fact that the MediaWiki message with the name of the documentation subpage (scribunto-doc-page-name) changed after creating some documentation (Arabic, Slovene – the latter one years after the patch mentioned in the description!); I wonder if it’s better now, or such bad pages will re-appear from time to time.

By the way, as far as I remember, sv:Modul:Infoboxtest wasn’t that broken—it simply used a Swedish table key containing an å unquoted, which should have been quoted (e.g. a.å.ba['å'].b). Could you please restore it and let the community decide whether they need the module? I’m happy to fix the Lua code after restoring if you wish.

The sv one wasn’t used anywhere (a couple of kinks and a redirect)… wasn’t edited recently and is obviously a test

I can restore it, but it didn’t seem worthwhile keeping

I've restored the sv one, but not fixed it.

I think I've fixed the rest linked, bar the private wiki ones.

it didn’t seem worthwhile keeping

I think this should be decided by the community; as a sysadmin, you should make the smallest possible change, which is in this case changing the content model.

I've restored the sv one, but not fixed it.

Thanks!

I think I've fixed the rest linked,

You’ve missed arz:وحدة:Hatnote/doc.

bar the private wiki ones.

And who can fix them? Assuming they run on WMF infrastructure, they should also be analyzed and fixed as necessary before proceeding here. Also, just to double-check, do you think I’ve left out any WMF wiki?

families = [
    'commons',
    'foundation',
    'incubator',
    'mediawiki',
    'meta',
    'species',
    'wikibooks',
    'wikidata',
    'wikimania',
    'wikimediachapter',
    'wikinews',
    'wikipedia',
    'wikiquote',
    'wikisource',
    'wikitech',
    'wikiversity',
    'wikivoyage',
    'wiktionary',
]

(By the way, you can run the script yourself, I’ve shared it in F35046157.)

6 wiki(s) had issues: ['wikimania:team', 'wikimediachapter:ec', 'wikimediachapter:id-internal', 'wikimediachapter:il', 'wikimediachapter:uk', 'wikimediachapter:ve']

I can create accounts on most of them, but for example, https://wikimedia.org.uk/wiki/Special:Version (which was uk.wikimedia.org at one point) is not hosted onsite by the WMF anymore. So I cannot necessarily do anything about that wiki.

Same for ve.wikimedia.org -> https://wikimedia.org.ve/

https://meta.wikimedia.org/wiki/Special:SiteMatrix (and hte API equivalent) would be the canonical list of wikis.

for example, https://wikimedia.org.uk/wiki/Special:Version (which was uk.wikimedia.org at one point) is not hosted onsite by the WMF anymore.

I don’t think we should care about wikis not hosted by WMF—they are third-party wikis like any other third-party wiki. There should be a note in the release notes, and their sysadmins should check and fix any broken modules. Only wikis that will get the change with the WMF release train (or earlier, like the beta cluster) matter.

https://meta.wikimedia.org/wiki/Special:SiteMatrix (and hte API equivalent) would be the canonical list of wikis.

It’s useful as another source to check, but I don’t see wikitech or the beta cluster there, others may also be missing.

Neither wikitech nor the betacluster are in the main cluster (though it's slowly moving to be more so).

Beta has it's own at https://meta.wikimedia.beta.wmflabs.org/wiki/Special:SiteMatrix