Template talk:maintenance category
Add topicAppearance
Latest comment: 8 months ago by Theknightwho in topic Deletion
Identifying sandbox modules and templates
[edit]Many possibilities:
- BASEPAGENAME: Module:sandbox, Template:sandbox
- SUBPAGENAME: Module:it-pronunciation/sandbox
- NAMESPACE PAGENAME: Module:User:Erutuon/01
- titleparts PAGENAME 1 2: Module:grc-decl/sandbox/decl/staticdata/dialects/documentation (currently at Module:User:Erutuon/grc-decl/sandbox/decl/staticdata/dialects/documentation)
- titleparts PAGENAME 2 -2: Module:it-pronunciation/sandbox/testcases, Module:Ital-translit/testcases/documentation
- titleparts PAGENAME 3 -3: Module:it-pronunciation/sandbox/testcases/documentation
— Eru·tuon 21:00, 5 March 2024 (UTC)
Code to run in JavaScript console on this page to print what CAT:E/hidden
expands to on each of the pages above:
Array.from(document.getElementsByClassName("mw-parser-output")[0].getElementsByTagName("a"))
.filter(a => a.hostname === mw.config.get("wgServerName"))
.map(a => new URL(a.href))
.filter(url => url.searchParams.get("action") === null)
.map(url => url.searchParams.get("title") ?? url.pathname.match(mw.config.get("wgArticlePath").replace("$1", "(.+)"))[1])
.forEach(title => {
new mw.Api().get({
action: "expandtemplates",
title,
text: "{{tracking category|CAT:E}}",
prop: "wikitext",
formatversion: 2
}, {
"async": false
}).then(r => {
console.log(title, r.expandtemplates.wikitext);
});
})
— Eru·tuon 21:45, 5 March 2024 (UTC)
Deletion
[edit]@Benwing2 I'm confused as to why you deleted this (aside from the fact it's still used): it's completely unrelated to WT:Tracking, as it's used to determine whether pages go into Category:Pages with module errors or Category:Pages with module errors/hidden, and so on. Theknightwho (talk) 00:29, 10 April 2024 (UTC)
- @Theknightwho My mistake! I just listed everything under the Template namespace beginning with 'tracking' and failed to notice the existence of this. Benwing2 (talk) 00:37, 10 April 2024 (UTC)
- @Benwing2 No worries - I've been meaning to convert it to Lua anyway, and might rename it to avoid confusion (probably to Template:maintenance category). It's mostly used in the MediaWiki namespace (e.g. MediaWiki:Scribunto-common-error-category), where certain pages are called automatically after certain triggers happen, but it's also used for some of the Module:headword/page categories as well. Theknightwho (talk) 00:44, 10 April 2024 (UTC)