Template talk:maintenance category

(Redirected from Template talk:tracking category)
Latest comment: 20 days ago by Theknightwho in topic Deletion

Identifying sandbox modules and templates edit

Many possibilities:

Eru·tuon 21:00, 5 March 2024 (UTC)Reply

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)Reply

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)Reply

@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)Reply
@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)Reply
Return to "maintenance category" page.