Jump to content

Module talk:WikiProject banner/Archive 16

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Lowercase sigmabot III (talk | contribs) at 17:59, 5 March 2025 (Archiving 1 discussion(s) from Module talk:WikiProject banner) (bot). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Archive 10Archive 14Archive 15Archive 16

Fallback conflict

@MSGJ: The new temporary …pages…articles fallback, introduced in the latest edit to this module, is conflicting with the existing Category-Class…NA-Class… fallback. This causes category talk pages to be placed in Category:NA-Class Comics articles instead of Category:Category-Class Comics articles. (And similarly for other classes and WikiProjects.) jlwoodwa (talk) 03:41, 17 December 2024 (UTC)

I've got a fix working in the sandbox; could an admin please sync this change over to the live module? jlwoodwa (talk) 04:02, 17 December 2024 (UTC)
How does your code interact with the exists check in lines 409-413 and 620-624? By the way, the bot should now be actively moving these categories, so it should all be sorted in a few days, so we could just wait? — Martin (MSGJ · talk) 10:57, 17 December 2024 (UTC)
The moving of the categories seems to have stalled at CfD, so we should probably fix this. Can you see if your code can be simplified so we don't check categories exist multiple times? By the way, it's great to have another Lua editor to help out — Martin (MSGJ · talk) 22:14, 17 December 2024 (UTC)
Yeah, the duplicated expensive function calls are bugging me too. I've reworked the function so it stores "which suffix worked" in a variable, and I've added a case before both exists-checks you mentioned so they'll use that variable instead if it's non-nil. That leaves at most three exists-checks per category (except maybe an edge case for FM); does this look good? jlwoodwa (talk) 00:12, 18 December 2024 (UTC)
Great, well I will do some testing and then deploy — Martin (MSGJ · talk) 08:33, 18 December 2024 (UTC)

 Done — Martin (MSGJ · talk) 10:44, 18 December 2024 (UTC)

Updating assessment_category

I think I've figured out why e.g. Category:Template-Class redirect pages articles is being populated – it's because assessment_category normally removes " articles" from the ends of category names, but hasn't been updated to also remove " pages". I fixed this in the sandbox and added a new testcase to demonstrate it. jlwoodwa (talk) 22:58, 18 December 2024 (UTC)

Easiest way to fix that is by editing the banner template [1] — Martin (MSGJ · talk) 23:01, 18 December 2024 (UTC)

Better redirect template handling

At Module:WikiProject_banner#L-283, the banner name should not be the value of local banner_name = mw.title.new(args.BANNER_NAME or 'Template:WikiProject ' .. (args.PROJECT or 'PROJECT')), but it should instead be the value of mw.getCurrentFrame():getParent():getTitle(), as this will allow any redirect usages to be validated as well, and not only those templates titled "WikiProject something". Gonnym (talk) 12:09, 4 January 2025 (UTC)