Jump to content

Wikipedia talk:WikiProject Templates/Unused Templates Task Force

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Hi. This is a neat task force. Trying to get rid of unused templates is very often thankless work and I appreciate you all stepping up. I've updated the unused templates (configuration) database report a bit to put redirects in italics, to make the timestamps a bit prettier, and to no longer exclude /doc subpages, along with a few other minor requested updates. We can make additional changes to this report if needed to support the task force's efforts. --MZMcBride (talk) 05:50, 10 February 2022 (UTC)[reply]

@MZMcBride thanks for the update! It would seem that there is some issue with the update though as pages like Template:! are included. Gonnym (talk) 08:12, 10 February 2022 (UTC)[reply]
The report also includes {{10}}, which is in the category Category:Wikipedia transclusionless templates. That category is supposed to be excluded. I like the inclusion of /doc pages, though; that's useful.
Would it be possible to set up this report to run daily for a while? We are quite active right now, and weekly updates make it so that multiple people are looking at the same templates sometimes. – Jonesey95 (talk) 14:51, 10 February 2022 (UTC)[reply]
Something also made {{BCA}} appear on the page, even though it's a template disambiguation page. Template dabs should not appear on the report. – Jonesey95 (talk) 16:54, 10 February 2022 (UTC)[reply]
Oop, there was a dumb typo in the code. I actually noticed Template:! popping up in the report but I was like "ehh, it is unused" and didn't think much more of it. The report should update again shortly and should hopefully be fixed now. I also adjusted the schedule to be daily. --MZMcBride (talk) 19:08, 10 February 2022 (UTC)[reply]
Excellent. I'm glad it was a quick fix. – Jonesey95 (talk) 19:40, 10 February 2022 (UTC)[reply]
  • MZMcBride, glad we can be of service. But I wouldn't have gotten this idea for the task force if it weren't for your report to begin with. You can help out if you're interested by adding yourself as a member on the project page. We're always looking for folks to help out. --WikiCleanerMan (talk) 15:51, 10 February 2022 (UTC)[reply]
    • Glad I could provide some inspiration. :-) I worked in this area many years ago, even getting CSD T3 approved, but it seems like it was subsequently revoked. I should have a bit of time and energy to provide technical support at least. --MZMcBride (talk) 19:10, 10 February 2022 (UTC)[reply]

It looks like Category:Wikipedia transclusionless templates will celebrate its 14th birthday on February 22. It predates the creation of the database reports project here, dang. --MZMcBride (talk) 19:14, 10 February 2022 (UTC)[reply]

@MZMcBride could the report be tweaked a bit more?
  • Templates starting with the prefix "User x" are almost all user boxes which don't really get deleted. This could be split into its own report Wikipedia:Database reports/Unused templates/userboxes so false positives could be found there if someone wants to.
  • Split the redirects into a different page number instead of completing the remaining number of spots in the list to 5000. Since redirects don't really get deleted, it would be useful if the important section of the report is as clean (=actionable) as possible.
  • Add unused modules to the report or to a Wikipedia:Database reports/Unused modules/ report. Modules are also handled in TfD so this would be helpful. Gonnym (talk) 09:24, 13 June 2022 (UTC)[reply]
Hello.
  • I'm not sure I follow this logic. If nobody's using a template such as Template:User Arctic Monkeys, why not delete it? In any case, there should already be a category or template that can be added to these templates to exclude them from the report.
  • You could futz with the pagination but I don't think it's worth the effort. We're already sorting non-redirects to the top and marking redirects in italics. Plus Jonesey95 is (was?) doing some additional filtering. (My bigger gripe is that 5,000 results per page is kind of annoying to load, but reducing the page size would just balloon the number of pages even further. So many redirects.)
  • I kept thinking you meant modules were being listed in this report since we were discussing this report. But now I see what you're actually asking about. The code is at <https://github.com/mzmcbride/database-reports> if you or someone else wants to try out adding an unused modules (configuration) report.
Hopefully some of this is helpful. --MZMcBride (talk) 21:03, 13 June 2022 (UTC)[reply]
  • I'm not sure I follow this logic - I'm with you there. There is no logic, but getting stuff like that deleted at MfD tends not to happen. Those templates use userbox, can that be used to filter them out or do you need for a template to be used on the /doc page?
  • Jonesey95 is (was?) doing some additional filtering - he is, but that means that he needs to manually do this each day, when a bot can do this automatically. The value in not having the redirects listed is that the list will eventually (hopefully) reach low numbers. This is both for practical uses - if I search for common words in the list I won't need to "find" the redirects as results, but also for moral - a never ending list that never gets shorter is just not something fun to work with. Since we already doing pagination and since you already know where the redirects start, then just starting the actual pagination splits from that point should not be that complicated code-wise. Gonnym (talk) 21:53, 13 June 2022 (UTC)[reply]

Hi Gonnym and others. Templates such as {{User Rand Paul}} really ought to be deleted. They're like shitty bumper stickers that can't find a single buyer. I adjusted the unused templates (configuration) report a bit. The report now excludes redirects, the rows per page was decreased from 5,000 to 2,000 since I was getting annoyed with the page size, and I removed the hour:minute:second specificity from the first and last edit columns. --MZMcBride (talk) 18:36, 23 June 2022 (UTC)[reply]

@MZMcBride thanks for the update! The alphabetical sorting disappeared with this new version. Could you restore it? Also, could you add Category:Template test cases and Category:Template sandboxes to the list of excluded templates? Gonnym (talk) 19:08, 23 June 2022 (UTC)[reply]
If {{User Rand Paul}} should be deleted per guidelines and policy, take it to MFD or wherever shitty bumper stickers are proposed for deletion. Twinkle makes it a pretty simple process. I suspect that you will be wasting your time, but I also enjoy being pleasantly surprised. – Jonesey95 (talk) 21:30, 23 June 2022 (UTC)[reply]
Sure, done. --MZMcBride (talk) 22:10, 23 June 2022 (UTC)[reply]
Sure, I made the sorting explicit.
I'm inclined to remove all the filtering other than Category:Wikipedia transclusionless templates. Needing to specify a list that includes categories such as Category:Subtemplates of Template RussiaAdmMunRef is pretty dumb, as far as I can tell. We should be able to use a single category for report filtering purposes. Am I missing something? --MZMcBride (talk) 22:19, 23 June 2022 (UTC)[reply]
I'm not entirely sure I understand your intent coding-wise. The templates at Category:Subtemplates of Template RussiaAdmMunRef are not in Category:Wikipedia transclusionless templates. Do you want someone to tag all 1400 pages with that category? Do you want to place the category as a sub-category of Wikipedia transclusionless templates? The former is not a good idea, it just creates massive work for us for no real reason or benefit. The later could work, but they don't all really fit in that category. They aren't all "transclusionless", but they might be categories that their templates should be excluded. In that regard, having an excluded list isn't a bad idea as it gives us more control over what we filter and deal with. In a similar way Category:Template test cases could be placed in Category:Wikipedia transclusionless templates, but there really isn't a reason to and it will just bloat that category and make whatever intended usage it was created for harder. Gonnym (talk) 22:31, 23 June 2022 (UTC)[reply]
@MZMcBride there is a large number of sandbox and testcase pages in the report. It would really help if you would filter those out based on the categories I mentioned above. Gonnym (talk) 06:37, 4 July 2022 (UTC)[reply]
@MZMcBride can you please help with this? There are quite a lot in the list which makes it unnecessarily harder to go find valid entries. Gonnym (talk) 07:51, 19 July 2022 (UTC)[reply]
Hi Gonnym. We're already excluding any page title that ends in "/testcases" or "/sandbox". What specifically is your concern? Please provide as many examples as you'd like. This report is intended to list unused templates. If the report is listing used templates, that would be a real and major bug. If it's listing unused templates that you personally just don't care about, that's a separate matter. :-) --MZMcBride (talk) 18:10, 19 July 2022 (UTC)[reply]
@MZMcBride The current filter isn't precice enough, while Template:Coord/sandbox is excluded, Template:Coord/sandbox2 is not. This is the same for Template:F1R2020/testcases2 or Template:Documentation/preload-testcases. However, as I wrote above, a better filter is to check if the page is in Category:Template test cases or Category:Template sandboxes which is where these pages are listed at when they use the correct template banner. Gonnym (talk) 12:20, 20 July 2022 (UTC)[reply]

I adjusted the report filtering and the report is significantly larger now. --MZMcBride (talk) 17:50, 20 July 2022 (UTC)[reply]

Thanks! I'll look into this. Sandbox and testcases that weren't in the correct categories can easily be tagged with the banners using AWB so that isn't too hard of a job. Gonnym (talk) 08:02, 21 July 2022 (UTC)[reply]
Were Template:Attached KML sub-pages excluded before? As my requested change shouldn't have affected that. Gonnym (talk) 08:08, 21 July 2022 (UTC)[reply]

I haven't really been following this conversation, but the unused template report, which was working well until 23 June, has gone haywire since then. First, the report stopped being contained on a single page, which makes it challenging to filter to User:Jonesey95/unused templates. And then it expanded to include thousands of additional pages that apparently had been excluded previously, including the notorious DYK pages, which should of course not be in template space.... Anything that can be done to restore this report to usefulness will be appreciated. – Jonesey95 (talk) 16:26, 22 July 2022 (UTC)[reply]

Yeah, I'm also not sure why all those were reintroduced as they had nothing to do with the requested change. Gonnym (talk) 10:36, 24 July 2022 (UTC)[reply]
There's an open request to address the "Did you know" pages, if you want to help out. --MZMcBride (talk) 18:16, 25 July 2022 (UTC)[reply]
The edit request has been implemented or fixed for the DYK pages. However, the main report is still not working as it was. I've posted this at Wikipedia talk:Database reports. --WikiCleanerMan (talk) 14:25, 5 August 2022 (UTC)[reply]
MZMcBride, I have returned from a month-long wikibreak to find that this report is still broken in multiple ways. The Attached KML files, which used to be excluded, are still being listed (they are typically linked instead of transcluded, so they are not unused). Also, pages like {{Bug resolved/sandbox}} are listed, when /sandbox pages used to be excluded. Can the settings for this report be returned to they way they were before June 23? If refinements are needed per the discussion above (e.g. filtering out /sandbox2), they can be made to that known good (or at least much better) code. – Jonesey95 (talk) 13:41, 23 August 2022 (UTC)[reply]
Welcome back. :-) Pages such as Template:Bug resolved/sandbox should be categorized in Category:Template sandboxes. That will remove them from this report. --MZMcBride (talk) 16:03, 23 August 2022 (UTC)[reply]
That would be a ton of busy work that would break as soon as anyone synced the sandbox with the content of the live template. It also won't fix testcases or Attached KML files or DYKs, which were all excluded until mid-June. Can we please go back to the June 2022 configuration and then proceed from there? – Jonesey95 (talk) 17:51, 23 August 2022 (UTC)[reply]

Hello. We now have a unused templates (filtered) (configuration) report. --MZMcBride (talk) 18:35, 6 October 2022 (UTC)[reply]

This looks like a good first draft. It currently has a little over 4,000 pages, while User:Jonesey95/unused templates has 2,000. It looks like some of the needed filtering (e.g. -stubs, testcasesn, "User " templates) is not yet in place. Keep up the good work! (P.S. It sure would be useful to have this report on a single page, for ease of examining diffs. 2,000 entries shouldn't be too big.) – Jonesey95 (talk) 00:19, 7 October 2022 (UTC)[reply]
@Jonesey95: are you comfortable submitting pull requests on GitHub? There's an in-browser editor that makes it pretty simple (I hope). Here's the code, at the top it shows the list of suffixes and prefixes to skip if you want to propose some new ones. Legoktm (talk) 05:38, 15 October 2022 (UTC)[reply]
Legoktm, I have used github only to view patches in the past. I attempted to submit a simple pull request just now. If it works, I can try to add a couple other filters. – Jonesey95 (talk) 16:17, 17 October 2022 (UTC)[reply]
@Jonesey95: yep, that worked! I merged and deployed both patches, it should be included in the next run. Legoktm (talk) 23:13, 17 October 2022 (UTC)[reply]
Legoktm, is there a way that this filtered report can get {{static row numbers}} at the top instead of individually numbered rows? See this old version of the unused template report for the format. If you have access to the previous version of the unused template db report code, it should show how that was done. My programming skills are not good enough to modify the filtered report from scratch, but if you have a link to the old report code, I can try to modify the current filtered report code and submit a pull request. – Jonesey95 (talk) 15:38, 22 October 2022 (UTC)[reply]
Done, hopefully. Legoktm (talk) 17:44, 23 October 2022 (UTC)[reply]

MZMcBride, is there a way to update the removal of doc pages that are being transcluded for the templated they were created for? There are hundreds of these listed. --WikiCleanerMan (talk) 22:45, 29 March 2023 (UTC)[reply]

If you are talking about listings like Template:ElCinemaPerson/doc, the way to get them off of the report is to null-edit the template page that transcludes it. In other words, go to Template:ElCinemaPerson, click Edit, and then click Publish. There are currently 79 such pages listed on the report; I have null-edited all of their parent pages just now. – Jonesey95 (talk) 12:50, 30 March 2023 (UTC)[reply]

Uncategorized templates report

[edit]

I've updated the links to this report page, it's now a more manageable list. It's 646 templates as of August 21, 2023. We may have the same deletion criteria as the typical Tfd nominations for a lot or just some. Does anyone for the time being want to help reduce the page? WikiCleanerMan (talk) 14:31, 28 August 2023 (UTC)[reply]

A couple of other editors and I have been chipping away at this page for a while. A few of them have been eligible for TFD, but many just need documentation and categories added to them. At User:Jonesey95/sandbox3, you can see a sorted version of the report without row numbers in the wikitext, which makes it easier to look at the diffs. – Jonesey95 (talk) 15:57, 28 August 2023 (UTC)[reply]
That's good. I'm sure it can be knocked out soon. My subpage which is a template category map could surely help out in finding categories for these templates. --WikiCleanerMan (talk) 00:29, 29 August 2023 (UTC)[reply]

Manageable reports

[edit]

Two years later after starting the task force and within a few months since both the unused and uncategorized template reports are now down to a few templates that are not doc pages or other subpages. I'm really glad we were able to reduce this enormous backlog that went back many years here on Wikipedia. I no longer feel I have to check the filtered report as much. Hopefully, carving out a remaining few more could eventually make the report a thing of the past. This has been incredible work done by members of this task force that joined alongside me. WikiCleanerMan (talk) 16:52, 3 December 2023 (UTC)[reply]

Agreed, with two caveats:
1. Wikipedia:Database reports/Unused templates (filtered)/1 is currently quite broken. It jumps up and down in size daily. I posted about it at the db reports talk page.
2. A couple of other gnomes and I have cleaned out Wikipedia:Database reports/Uncategorized templates and I continue to do so weekly, but it is missing hundreds or thousands of pages that are in automatically assigned categories like Category:Lua-based templates, Category:Navboxes using background colours, and Category:Wikipedia extended-confirmed-protected templates. I have a growing list of categories that should be excluded from "counting" as categorizing a template, but I haven't wanted to make a lot of extra work for myself, so I have not made a request to have the report modified. – Jonesey95 (talk) 03:16, 4 December 2023 (UTC)[reply]
The filtered report hasn't been updated since December 2. But from what I've seen is that very few templates from this year remain. --WikiCleanerMan (talk) 16:07, 5 December 2023 (UTC)[reply]
I count 202 templates created in 2023 in the latest near-complete version of the report. – Jonesey95 (talk) 16:45, 5 December 2023 (UTC)[reply]
The updated report should include sub-pages which are currently excluded. Even the standard /doc, /sandbox, and /testcases are categorizied. Gonnym (talk) 17:17, 5 December 2023 (UTC)[reply]
Even then the various reports we have at our disposal has gotten to the lowest level probably ever. --WikiCleanerMan (talk) 19:07, 5 December 2023 (UTC)[reply]

Unused Disambiguation templates

[edit]

How do people feel about unused disambiguation templates being reported on the unused report? Should the ones that are listed on the report be marked transclusionless? WikiCleanerMan (talk) 19:30, 19 November 2024 (UTC)[reply]

Which report? We have at least three reports of unused templates at this point, with different ways of excluding sets of templates from each one. – Jonesey95 (talk) 20:21, 21 November 2024 (UTC)[reply]
Filtered. --WikiCleanerMan (talk) 22:22, 21 November 2024 (UTC)[reply]
Don't make us guess what specific templates you are asking about, please link them. Gonnym (talk) 15:19, 24 November 2024 (UTC)[reply]
But to answer a general question, no. No template group should get an automatic hide from the report. There should be an actual issue that prevents it valid use from registering as a transclusion (subst templates, preloads, etc.) which then leads us to hide it manually. Gonnym (talk) 15:20, 24 November 2024 (UTC)[reply]