Jump to content

Module talk:WikiProject banner/Archive 15

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 10Archive 13Archive 14Archive 15

Execution time

I've recently been looking into the execution time of this module due to a couple of lua timeout errors occassionally popping up on larger pages with a lot of banner templates (e.g. 1, 2, 3 (not entirely wpb's fault)). I've already proposed a change to a module this module uses which should solve the issue well enough, but I think it's still worth looking into optimising this code.

I've noticed that this module can call Pagetype (which is intensive in comparison to most things required) on the same page up to (but not always) 3 times while handling a banner (see lines 161, 299, and 327). Considering 2 of them are caused by calling class_mask (definitely a duplicate pagetype call we don't need to make), I feel like it should be possible to reduce the max calls to 2, but the functionality of some of this module is beyond me (no clue what FQS means to start with), so I'm not confident I could optimise this myself without breaking some sort of functionality. Could someone consider taking a look at this? Aidan9382 (talk) 22:16, 21 March 2024 (UTC)

I guess it should be possible to reduce the calls to pagetype to 1. I'll have a look when I get a chance — Martin (MSGJ · talk) 22:38, 21 March 2024 (UTC)
Okay please have a look at my changes in the sandbox. There would need to be a minor change to Module:Banner shell at the same time — Martin (MSGJ · talk) 12:32, 22 March 2024 (UTC)
No comment on functionality, but I imagine there are testcases for this module in terms of that (though unless there was some sort of super specific scenario where the main function specifically but not the class mask wanted to ignore disambiguation, I doubt anything is broken). Thanks to this change and a change in a different module, the sandbox version is now running about 6.5 times faster than the live version in the worst case scenario (significantly large pages, all 3 pagetype calls - I'm using Talk:List of common misconceptions for my testcases), which is a huge improvement, so thanks for doing that. I'd recommend updating banner shell before this module whenever that happens so there isn't a small window where stuff breaks. Aidan9382 (talk) 17:04, 22 March 2024 (UTC)
Great. I've implemeneted your changes to pagetype. I will have a look to see if any other changes are needed to banner shell and then probably do that one later today. Can I ask how you came across Talk:List of common misconceptions and discovered the issue? By the way, when we have resolved all the conflicting article ratings, I hope we will be able to improve efficiency by just doing the quality assessment once (on the banner shell) rather than having to it on each individual banner — Martin (MSGJ · talk) 19:30, 22 March 2024 (UTC)
I came across that talk page since my bot, which handles bad archive values in {{User:MiszaBot/config}} as one of its tasks, kept throwing warnings for pages that had appeared in a tracking category despite having what it (correctly) thought was the already right input (you can see the result of me purging some of the pages to temporarily remove the timeout in Special:Diff/1214818416). I just removed templates and used show preview till I found what was responsible for the majority of the execution time, which is why I've been improving the execution time of multiple modules recently. Aidan9382 (talk) 19:39, 22 March 2024 (UTC)
New code deployed, so hopefully that reduces the lag on these pages — Martin (MSGJ · talk) 21:06, 24 March 2024 (UTC)
Thanks, stuff's looking much better now (not even 2s on the misconceptions page compared to over 6s before the updates). Aidan9382 (talk) 21:28, 24 March 2024 (UTC)

Template uses custom code to implement a custom quality rating, but it does not do it in the usual way with a custom mask. I'm not sure what to do with this template so dropping it here in case others have an idea. — Martin (MSGJ · talk) 23:15, 23 February 2024 (UTC)

@Kanashimi, @Qwerfjkl: please could you not remove any class parameter from this template until we figure out the best way to code it? It is using a custom mask, but not in the usual way. — Martin (MSGJ · talk) 20:56, 2 March 2024 (UTC)
Martin, I've stopped my bot, it's run on the vast majority of pages. — Qwerfjkltalk 20:58, 2 March 2024 (UTC)
Okay, wow. I didn't realise you had already finished! — Martin (MSGJ · talk) 20:59, 2 March 2024 (UTC)
Martin, yes, we've totally emptied the main two categories (in the main talk namepace). Around 4-5 million pages, I think. — Qwerfjkltalk 21:01, 2 March 2024 (UTC)
Yes, we've already processed a round of major categories. But I'm still on the task of removing obsolete parameters. I suggest adding {{Etymology section}} to Category:WikiProjects using a non-standard quality scale first. Kanashimi (talk) 22:53, 2 March 2024 (UTC)
How is that template not appearing in Category:WikiProject banners with non-standard names? Gonnym (talk) 13:33, 3 March 2024 (UTC)
The current logic is (args.PROJECT_NAME=='WikiProject '..project or not args.PROJECT_NAME) and current_page.rootPageTitle.prefixedText~='Template:WikiProject ' .. project In this case the project name is not WikiProject PROJECT and it is not undefined — Martin (MSGJ · talk) 13:56, 3 March 2024 (UTC)
Maybe adjust this so we check either if |PROJECT_NAME= is equal to "WikiProject project" OR the template name does not start with "WikiProject"? Since we standardized on "WikiProject project" for these templates, there really shouldn't be many with non-standard valid names I think, unless I missed something. Gonnym (talk) 15:23, 3 March 2024 (UTC)
This banner isn't for a WikiProject. Perhaps that issue should be corrected instead? Izno (talk) 17:53, 3 March 2024 (UTC)
Isn't it part of linguistics project? — Martin (MSGJ · talk) 19:22, 3 March 2024 (UTC)
A task force of that project, yes. Izno (talk) 22:11, 3 March 2024 (UTC)
I usually nominate task force banners to merge with their project banner but because this had manual code in it I left it alone for now as I didn't investigate what that code does and if indeed it needs manual code. Gonnym (talk) 06:52, 4 March 2024 (UTC)
I think I'll start by removing the custom code and attempting to use the standard methods. If that works then we can look at the next step — Martin (MSGJ · talk) 18:31, 4 March 2024 (UTC)
Conclusion: it is easy to convert it, but some categories would need to be renamed. Test cases at Template:Etymology section/testcases. I have also dropped a note on Wikipedia talk:WikiProject Linguistics. Also, there are only 145 pages using this template so it was never really adopted on any scale — Martin (MSGJ · talk) 18:47, 4 March 2024 (UTC)
Maybe after merging with {{WikiProject Linguistics}}, the syntax can be changed to something similar to this:
so instead of a new set of unique classes, it will just be another parameter that will trigger the placement in the category. Gonnym (talk) 10:02, 6 March 2024 (UTC)
Sounds like a good plan. I also think we could rename Category:Articles with mid-importance etymologies to Category:Mid-importance etymology articles or similar — Martin (MSGJ · talk) 10:30, 6 March 2024 (UTC)
I feel like those are just other ways to grade each article with a class, which we have examples of for task forces. Good would put it in B, incomplete C or start, unassessed is missing a grade, and missing is probably equivalent to unassessed ultimately... Izno (talk) 17:17, 6 March 2024 (UTC)
That's also a good point. Gonnym (talk) 07:19, 7 March 2024 (UTC)
Missing etymology might just be like |needs-infobox= I guess, but the rest all have direct analogs to our rating system. Izno (talk) 16:32, 7 March 2024 (UTC)

Due to the lack of any response at the project talk page, it seems no one is interested in this template, so I have just removed the non-standard assessments altogether. If this gets reverted then we can look at methods to preserve the assessments in a more standard way — Martin (MSGJ · talk) 09:15, 3 April 2024 (UTC)

Documentation

There is a piece of automatically generated documentation on Template:WikiProject Military history that says "This project has opted out of project-independent quality assessments and is using a custom class mask." The Project has not opted out of project-independent quality assessments. Can we delete "has opted out of project-independent quality assessments"? I am unsure where this is done. Hawkeye7 (discuss) 00:07, 1 April 2024 (UTC)

The military history project has opted out of PIQA. That is the only way to support the custom quality scale. — Martin (MSGJ · talk) 09:10, 1 April 2024 (UTC)
What would be the effect of adopting the PIQA? Hawkeye7 (discuss) 17:43, 1 April 2024 (UTC)
Losing all the custom logic in Template:WikiProject Military history/class — Martin (MSGJ · talk) 09:09, 3 April 2024 (UTC)
Does that include the A-class logic or just the B-class logic? Hawkeye7 (discuss) 18:12, 3 April 2024 (UTC)
You'd certainly lose AL, BL and CL, probably several of the others; you might be left with just the standard scale (FA, A, GA, B, C, Start, Stub, FL, List). --Redrose64 🌹 (talk) 19:01, 3 April 2024 (UTC)

Deletion of Template:WPBannerMeta/taskforce caused a table error at Template:WPBannerMeta/hooks/taskforces/taskforce

Deletion of {{WPBannerMeta/taskforce}} has caused a table error at {{WPBannerMeta/hooks/taskforces/taskforce}}. I don't know what was in that deleted page, so I don't know what to insert into the latter page's noinclude tags to work around this error. – Jonesey95 (talk) 13:33, 26 April 2024 (UTC)

It wasn't being used, so I have deleted it under G8 — Martin (MSGJ · talk) 13:54, 26 April 2024 (UTC)
It looks like {{WPBannerMeta/hooks/taskforces/templatepage}} may also have become unused and deleteable. – Jonesey95 (talk) 14:32, 27 April 2024 (UTC)
I believe it is only Template:WikiProject Indian roads, Template:WikiProject U.S. Roads and possibly some other roads projects that are using this depcrecated code now — Martin (MSGJ · talk) 14:22, 30 April 2024 (UTC)

Classifying subpages in main talk

All pages not in article space are automatically detected as being non-articles. But Gonnym pointed out that we have some subpages in Main talk space (e.g. Talk:Multiverse (Marvel Cinematic Universe)/FAQ) which should also be classified as non-articles. The types I have seen are FAQ pages like the above, or talk archive pages. It is not clear how we should classify them (e.g. Project-class) or just use the default NA-class for these types of page. Does anyone have any opinion? — Martin (MSGJ · talk) 17:50, 6 May 2024 (UTC)

I'd say that talk archive can be NA like regular talk. /FAQ (and maybe /GA) ideally should be project but if that is an issue then NA can work also (or allow manual override with the normal class parameter). Gonnym (talk) 08:15, 7 May 2024 (UTC)
I think I would prefer to treat all these subpages in the same way, rather that try to guess what they are based on the name of the page — Martin (MSGJ · talk) 11:10, 7 May 2024 (UTC)

PROJECT_STATUS parameter

The module currently has an undocumented parameter for the status of a project, which will add a CSS class to the outer table. For example if you set |PROJECT_STATUS=semiactive then it will add class="semi-active-project". Does anyone know if this has any purpose or is used by any tools? It either needs documenting properly or removing — Martin (MSGJ · talk) 11:53, 24 April 2024 (UTC)

The rendering of the banner changes also, see uses. Izno (talk) 16:45, 25 April 2024 (UTC)
The rendering of inactive banners is not triggered by the PROJECT_STATUS parameter. It's produced by a different ("inactive") function of the module — Martin (MSGJ · talk) 08:58, 26 April 2024 (UTC)
This parameter was added in 2021 after this request by User:MJL. The rationale given was "The change adds a new class to the banner which would allow users to hide inactive WikiProject at their own discretion". — Martin (MSGJ · talk) 09:01, 26 April 2024 (UTC)

Here are my thoughts:

  • It is understandable that some editors wish to hide inactive banners, and the inactive-project class should continue to be applied to inactive banners.
  • I do not see the value of active-project or semi-active-project and I don't believe anyone is using these.
  • The |PROJECT_STATUS= parameter can be dropped from active project banners
  • For inactive banners, there may be some utility in allowing |PROJECT_STATUS=defunct to be defined instead of the default |PROJECT_STATUS=inactive. So this parameter should continue to be supported for inactive banners.
  • Other statuses listed at Wikipedia:Inactive WikiProjects such as "dormant", "revivable", "dead", "stillborn" will not be supported unless there is a specific request for this.

— Martin (MSGJ · talk) 11:16, 29 April 2024 (UTC)

@MSGJ: I'd agree with what you've laid out there. –MJLTalk 18:30, 29 April 2024 (UTC)
Out of interest, did you use personal CSS to hide these banners, or are you aware of users who have done so? — Martin (MSGJ · talk) 20:27, 29 April 2024 (UTC)
 Done — Martin (MSGJ · talk) 11:20, 9 May 2024 (UTC)

Moving notes to banner shell

There is some talk on Template talk:WikiProject banner shell about moving certain commonly used notes (e.g. attention needed, infobox needed, image needed) to the banner shell, to avoid multiple projects having to replicate the same parameter. Any comments over there please — Martin (MSGJ · talk) 15:09, 21 May 2024 (UTC)

Outdated code/hooks

I am working through the remaining templates using the old hooks.

If anyone knows of any more please add to the list — Martin (MSGJ · talk) 15:29, 23 May 2024 (UTC)

insource:"WPBannerMeta/hooks/" shows that hooks are used at Template:WikiProject Figure Skating/A-Class review, Template:WikiProject Military history/aclass (and /sandbox), Template:WikiProject Pirate Politics, and Template:WikiProject The Beatles/sandbox. Gonnym (talk) 11:33, 28 May 2024 (UTC)
Thanks, I'll look at those — Martin (MSGJ · talk) 15:34, 2 June 2024 (UTC)

Template:WikiProject United States

Hi, the template is populating Category:Pages with script errors, and it only displays the following message:

"The time allocated for running scripts has expired. The time allocated for running scripts has expired."

I don't know how to fix this, please help, thanks!! --Funandtrvl (talk) 17:00, 2 June 2024 (UTC)

Please can you provide an example of a page with a script error — Martin (MSGJ · talk) 08:21, 4 June 2024 (UTC)
@Funandtrvl — Martin (MSGJ · talk) 21:19, 6 June 2024 (UTC)
Hi, the problem fixed itself after a few hours. Thank you! --Funandtrvl (talk) 01:01, 8 June 2024 (UTC)

A-class review tweaks

I have made some small changes to Module:WikiProject banner/config/sandbox and Module:WikiProject banner/auxiliary/sandbox to allow me to stop using custom code at Template:WikiProject Military history/aclass. The only differences is that |A-class=kept and |A-class=keep and treated the same as |A-class=pass, and |A-class=demote and |A-class=demoted are treated the same as |A-class=fail — Martin (MSGJ · talk) 12:03, 10 June 2024 (UTC)

Deployed — Martin (MSGJ · talk) 21:34, 10 June 2024 (UTC)

Styles

@Gonnym: regading this edit, are you able to make the corresponding changes to Module:WikiProject banner/sandbox/styles.css? — Martin (MSGJ · talk) 13:25, 12 June 2024 (UTC)

I have very basic skills in CSS. @Izno can you help with this? Gonnym (talk) 17:02, 12 June 2024 (UTC)
I am happy to walk you through it; this task is a bit easier than poofing CSS out of thin air. The basic gist of what needs to be done here is:
  1. See if there's a class some CSS can be attached to. The presence of addClass will usually make that obvious.
    1. If no, add a class (addClass).
    2. If yes, check to see if the uses in the generating module all need that particular CSS. If yes, proceed to 2. If no, add a specific class to that specific element to support the new CSS.
  2. Move the CSS to the sheet.
I know you've done this before with ib-tv-episode. :P Izno (talk) 20:37, 12 June 2024 (UTC)

IM_TOPIC_CATEGORY may not be working in all cases

The documentation appears to say that |IM_TOPIC_CATEGORY= should provide a default category for requested images or photographs. In {{WikiProject Fishes}}, |IM_TOPIC_CATEGORY=Wikipedia requested images of fish. The category exists at Category:Wikipedia requested images of fish. Despite that looking correct to me, Talk:Bryconops sapezal uses that WikiProject template with |needs-image=yes, and the incorrect Category:Wikipedia requested photographs of is added to the page. Can someone please troubleshoot or explain this apparent discrepancy? – Jonesey95 (talk) 23:07, 20 June 2024 (UTC)

I have applied a fix, hopefully will be resolved now — Martin (MSGJ · talk) 06:50, 21 June 2024 (UTC)

Preview warning: unexpected parameter "attention"

I'm getting a red warning saying, unexpected parameter "attention" while attempting the following:

{{WikiProject Intertranswiki/OKA|attention=yes}}

The interesting thing is, that in preview mode it is properly generating the notice with the diamond caution sign and "immediate attention needed", as well as displaying the name of the hidden attention-needed category in the footer that would be populated if I hit Publish, but all of that with the Preview error at the same time.

Not sure if it's relevant, but the PROJECT param is Intertranswiki/OKA task force, and a couple of redirects are involved:

Have I bolloxed it all up with the redirects, somehow? Can someone help me understand what's going on? Mathglot (talk) 07:25, 2 July 2024 (UTC)

Further data: I went ahead and saved the page with the Preview error anyway, at Draft talk:Contravention in French criminal law with the intention of pointing to the error here, but after publication the error was gone, and the banner message and hidden category look good. So far, so good; but |attention= is a valid parameter, so why does it say that it isn't in Preview? Preview mode still displays the error message now, if you edit it. Mathglot (talk) 07:36, 2 July 2024 (UTC)
It's because you did not define the |BANNER_NAME= parameter, and so it uses by default Template:WikiProject+PROJECT which in this case yields Template:WikiProject Intertranswiki/OKA task force which is not the template but a redirect. I have added |BANNER_NAME= which I think has fixed it — Martin (MSGJ · talk) 08:07, 2 July 2024 (UTC)
MSGJ, Yes, it has! Thank you. Given the complexity of this Module, and the type of situations that might arise, I am considering adding a Troubleshooting section to the doc page, and this would be a good entry there. Or at least, where to look if you get that error message, would be a good start. Such a section might expand to cover other situations, as well. Thanks for your fixes to that template. Mathglot (talk) 10:35, 2 July 2024 (UTC)
In general though, this error should be a very rare edge case, as task forces should not have standalone banners as they should use the one of the project they belong to. In this situation, there isn't a project one at this moment. Gonnym (talk) 10:57, 2 July 2024 (UTC)
Gonnym, thank you for your comment I did notice that the module had params like |tfN= for handling task forces, and I wondered how to proceed with that, given that the parent WikiProject didn't have its own banner, so I did the best I could. What I'm hearing, is, maybe this is too rare a case to be worth writing up as a troubleshooting case, and I accept that. But, what is the right path forward, here? Should Intertranswiki have its own banner, and then */OKA would use the |tfN= params? Or, is it good enough, the way things are, now? Mathglot (talk) 11:06, 2 July 2024 (UTC)
I think that if there are not going to be any other task forces needing one, then don't bother changing it as it's already working. If another task force will need one then yes, they should be combined into one template. Gonnym (talk) 11:09, 2 July 2024 (UTC)

Dark mode support

I implemented dark mode support for the banners in these sandbox edits, without those on dark mode the banners are showing white text on light yellow background which is not great. The test cases seem good to me, but I would still appreciate a second set of eyes on the change before deploying it. Taavi (talk!) 22:20, 4 July 2024 (UTC)

Also  Done for the non-sandbox version. Taavi (talk!) 11:58, 7 July 2024 (UTC)
Thanks. Maybe coordinate with User:Jdlrobson as he was working on this also — Martin (MSGJ · talk) 02:57, 8 July 2024 (UTC)

Military history articles with no associated task force

Category:Military history articles with no associated task force is full of articles from the Draft talk namespace. Could the module be adjusted to only add talk namespace articles to the category? Hawkeye7 (discuss) 02:46, 1 August 2024 (UTC)

That isn't a module fix. You'll have to edit the note_2 of the banner itself. Gonnym (talk) 03:08, 1 August 2024 (UTC)

Syntax highlighting in automatic documentation

Could syntax highlighting be added to the automatic documentation (i.e. when |DOC=auto)?

Current display (e.g. Template:WikiProject AfroCreatives#Full usage):
{{WikiProject AfroCreatives |category= |listas= |class= |importance= |auto= |attention= |needs-image= |type= |details= |location= |topic= }}

Proposed:
{{WikiProject AfroCreatives |category= |listas= |class= |importance= |auto= |attention= |needs-image= |type= |details= |location= |topic= }}

Only applicable in the #Basic usage & #Full usage sections (I think).   ~ Tom.Reding (talkdgaf)  17:42, 30 May 2024 (UTC)

That sounds good (and uncontroversial) to me, but after some searching, I have been unable to figure out where the relevant code is. Sdkbtalk 18:31, 30 May 2024 (UTC)
It seems like it might be at Module:WikiProject banner/templatepage from lines 833-863. Someone who knows Lua would need to implement. Sdkbtalk 18:35, 30 May 2024 (UTC)
Excellent idea. I will do it shortly unless someone else has already done it — Martin (MSGJ · talk) 15:33, 2 June 2024 (UTC)
Please check Template:WikiProject Cycling/sandbox and feed back? I notice you used the "inline" option but I don't know what difference that makes — Martin (MSGJ · talk) 08:36, 4 June 2024 (UTC)
Compare this: {{WikiProject AfroCreatives |category= |listas= |class= |importance= |auto= |attention= |needs-image= |type= |details= |location= |topic= }} which uses inline, with this:
{{WikiProject AfroCreatives |category= |listas= |class= |importance= |auto= |attention= |needs-image= |type= |details= |location= |topic= }}
which doesn't. --Redrose64 🌹 (talk) 12:37, 4 June 2024 (UTC)
Got it. So I think in this case we do not want "inline", so this should be good to go — Martin (MSGJ · talk) 17:15, 4 June 2024 (UTC)
Any luck with this?   ~ Tom.Reding (talkdgaf)  12:42, 26 July 2024 (UTC)
Think it was deployed ages ago - are you not seeing it? — Martin (MSGJ · talk) 19:54, 5 August 2024 (UTC)
Seems Pppery reverted the edits here. Gonnym (talk) 19:59, 5 August 2024 (UTC)
Ah, didn't realise that. My understanding is that all these category issues were resolved so I have redeployed the code. — Martin (MSGJ · talk) 20:18, 5 August 2024 (UTC)
{{Looks |great=!}}   ~ Tom.Reding (talkdgaf)  10:29, 6 August 2024 (UTC)
Reverted again by Timrollpickering. Please can you explain what problems you are seeing? — Martin (MSGJ · talk) 15:04, 7 August 2024 (UTC)
See Wikipedia:Village pump (technical)#WikiProject templates category redirect mess for the various category redirects this has impacted. Several are being fixed through renames. Timrollpickering (talk) 14:13, 8 August 2024 (UTC)
Thanks for the note. I think I will redeploy the code but populate a tracking category instead of non-existent category so we can check for issues. — Martin (MSGJ · talk) 20:25, 8 August 2024 (UTC)
Does the olive text-to-background contrast really pass accessibility here, let alone on the gray background? —  HELLKNOWZ  TALK 15:20, 7 August 2024 (UTC)
If you think this is an issue, then I would suggest you discuss at mw:Extension talk:SyntaxHighlight — Martin (MSGJ · talk) 07:00, 9 August 2024 (UTC)

Urgent: Please fix this template for printed content Module:WikiProject banner/sandbox/styles.css.

Firstly, apologies for writing in English if this is not your first language (this is an automated message).

This template has been detected as one of 436 pages using styles that break the page when printed when the user is using dark mode. The fix is very straightforward - all your styles relating to dark mode must be scoped to. Since there is a high risk of this templates being copied to other wikis it is important this notice is acted on ASAP.

To fix this:

  1. Update `@media (prefers-color-scheme: dark` to `@media screen and (prefers-color-scheme: dark`
  2. Wrap any styles relating to `html.skin-theme-clientpref-night` in `@media screen`

If this message has not been acted on in 7 days, this will be fixed by an automated script. Thank you for your help fixing this important issue.

For any questions feel free to ask them at phab:T369874.

Jon (WMF) (talk) 18:22, 2 August 2024 (UTC) on behalf of the web team.

I've syncrhonised this sandbox with the live version, which should have fixed these issues. Gonnym: you may want to reapply your changes to the sandbox at some point — Martin (MSGJ · talk) 10:29, 6 August 2024 (UTC)
I'll pass. Gonnym (talk) 10:31, 6 August 2024 (UTC)
I've added back the css code to the styles sheet. Perhaps you wouldn't mind checking the code and making sure everything looks okay, and I will deploy — Martin (MSGJ · talk) 20:43, 11 August 2024 (UTC)
The examples at Module talk:WikiProject banner/testcases look the same between the live and sandbox versions, so it seems so. The Class mask tests have some fails but I'm assuming that is from something else. Gonnym (talk) 21:03, 11 August 2024 (UTC)
Yeah, the class mask tests were all copied from Template:Class mask and there have been many changes since then. So the tests are outdated and probably need removing. — Martin (MSGJ · talk) 08:37, 16 August 2024 (UTC)

Responsible editing

Can we please reduce the churn on a module with 11 million transclusions? I pushed back when @Pppery wanted to fully protect the module because I thought template editors could be trusted to edit responsibly, but now I'm thinking he was right. Can all edits be sandboxed and tested prior to deploying. Anything less than urgent should wait in the sandbox for a more substantive edit. We should be at the point where we can make an update to the live module once every 2-3 months — Martin (MSGJ · talk) 08:59, 20 August 2024 (UTC)

Renaming categories

After a request at WP:CFDS, Category:Top-importance Start-Class Palaeontology articles is supposed to be renamed to Category:Start-Class Palaeontology articles of Top-importance. Am I correct that this module automatically handles categorizing the pages? I feel like it did at one point? When I attempted to move the category, Talk:Paleontological site was no longer in Category:Top-importance Start-Class Palaeontology articles (good) but was also not in Category:Start-Class Palaeontology articles of Top-importance (bad). There are also a bunch of similar categories at WP:CFDW in the same situation.

Courtesy link to {{WikiProject Palaeontology}}, if that helps.

Any help would be appreciated :) Best, HouseBlaster (talk · he/they) 20:19, 23 August 2024 (UTC)

You will need to update |QII_FORMAT=C T of I in Template:WikiProject Palaeontology. Note that the module is set up so these categories are only populated when they exist, so once you move the category they should start filling up again — Martin (MSGJ · talk) 20:38, 23 August 2024 (UTC)
Thank you so much!! Not sure how I missed that… HouseBlaster (talk · he/they) 21:01, 23 August 2024 (UTC)

Redirects not being added to PIQA category

I notice that on Talk:Mount Gorton (Mount Gorton redirects to Wilson Hills), all 3 WikiProjects are classified via 3 |class=Stub, {{WPBS}} is not, and Talk:Mount Gorton is not added to Category:Pages using WikiProject banner shell without a project-independent quality rating (0). Could redirects be made to be included in the category, and eventually corrected? And any/all other page types also being omitted?   ~ Tom.Reding (talkdgaf)  13:28, 1 July 2024 (UTC)

It is not in that category because it is a redirect and doesn't need a quality rating. The |class=stub is just ignored on such pages. What needs to be corrected? — Martin (MSGJ · talk) 14:15, 1 July 2024 (UTC)
Since Talk:Mount Gorton refers to a redirect, |class=Stub should be removed from the 3 WikiProjects.
I see now that Pages using WikiProject banner shell without a project-independent quality rating is not an appropriate category name for such cases (as it implies they need a rating), but I still think it would be worth tracking these pages that use unnecessary quality ratings.   ~ Tom.Reding (talkdgaf)  14:53, 1 July 2024 (UTC)
In that case it should probably be in Category:WikiProject banners with redundant class parameter as the class stub is redundant (and incorrect, as redirects don't have ratings). Gonnym (talk) 15:01, 1 July 2024 (UTC)
Perhaps we could rename to Category:WikiProject banners with ignored class parameter? — Martin (MSGJ · talk) 15:06, 1 July 2024 (UTC)
"Redundant" seems most appropriate for proper articles which have a rating both inside a WikiProject and the shell.
"Ignored" seems most appropriate for these redirects (and other similar pages) which have irrelevant class parameters.   ~ Tom.Reding (talkdgaf)  15:15, 1 July 2024 (UTC)
They are the same in that the class parameter may safely be removed without having any effect. Do we need two separate categories? — Martin (MSGJ · talk) 15:42, 1 July 2024 (UTC)
With the speed at which these categories are being cleared, I'd say we don't. Less categories to watch. Gonnym (talk) 16:13, 1 July 2024 (UTC)
The way that the pages in these 2 would-be categories are fixed is different. In 1, WPBS's |class= is kept. In the other, WPBS's |class=, if found, is removed. Someone working on these categories in the future might not know to check the redirect-status of the page before proceeding, and perform the wrong operation.
But, if there is to be only 1 category to contain both of these cases, then I think "unnecessary" is better, as it can describe both "redundant" & "ignored" ~ Category:WikiProject banners with unnecessary class parameter. 2nd choice would be "ignored". With category text describing this distinction, regardless of the chosen descriptor.   ~ Tom.Reding (talkdgaf)  16:27, 1 July 2024 (UTC)  ~ Tom.Reding (talkdgaf)  16:42, 26 August 2024 (UTC)

Warnings

I would like to add some prominent warnings when people try to use the |class= parameter in a project banner instead of in the banner shell template

  1. If {{WikiProject banner shell}} is already on the page (but without a |class= parameter), then the message will say something like Please add the quality rating to the WikiProject banner shell instead of this project banner
  2. If {{WikiProject banner shell}} is not on the page yet, then the message will say something like Please add the WikiProject banner shell template to this page and then add the quality rating to that template

I'm sure the wording could be improved. What do you think? — Martin (MSGJ · talk) 12:08, 10 June 2024 (UTC)

Please add {{WikiProject banner shell}} to this page and add the quality rating to it. maybe something like this? Regardless, link the banner shell template. I'm in favor of the warning. Gonnym (talk) 21:38, 10 June 2024 (UTC)
Yep, probably a link a WP:PIQA somewhere in there too — Martin (MSGJ · talk) 21:39, 10 June 2024 (UTC)
This should be expended to any parameter we migrate to the shell, like |listas= do deal with redundant, duplicate or conflicting data. Gonnym (talk) 16:20, 11 June 2024 (UTC)
This is now coded on the sandbox. Example of the first message can be seen at Module talk:WikiProject banner/testcases#Globally unassessed. the second message below — Martin (MSGJ · talk) 10:24, 3 July 2024 (UTC)
WikiProject iconCycling B‑class
WikiProject iconThis article is within the scope of WikiProject Cycling, a collaborative effort to improve the coverage of cycling on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
BThis article has been rated as B-class on Wikipedia's content assessment scale.
???This article has not yet received a rating on the project's importance scale.

Okay this is ready to go, but I will wait for Category:Pages using WikiProject banner shell without a project-independent quality rating (0) and Category:Articles with WikiProject banners but without a banner shell (18) to be emptied first to avoid ugly warnings on so many pages — Martin (MSGJ · talk) 09:35, 4 July 2024 (UTC)

Note: this is now deployed — Martin (MSGJ · talk) 12:17, 16 August 2024 (UTC)
Is it too late for me to object to this? As I said at the template talk page, something like this is just dumb; if we are going to force people to use the banner shell, then we should integrate it into every WikiProject banner automatically. I don't mind giving a warning if there's already a WPBS on the page, since it's a "hey, this is here, please put your banner in the right place", but for a page with no shell it shouldn't have a warning. (please do not ping on reply) Primefac (talk) 21:26, 17 August 2024 (UTC)
What Primefac said. On talk pages other than the main Talk: space, people should not be forced to use a WPBS, particularly when there is only one WP banner, because the autodetection of class is pretty much universal. --Redrose64 🌹 (talk) 07:29, 18 August 2024 (UTC)
The error can probably be removed from the user space. Other than in user space (which the updated code isn't placing in Category:WikiProject banners without banner shells (pages there need to be purged to reflect the update), so will not be relevant here), almost all pages have already been placed inside the banner shell, so any change at this point is purely disruptive, in addition of course, to the fact that no ones owns project pages so no one is forced into anything. Having the shell, even for one template, provides a consistent look across the entire project and allows any future update (which might be relevant to pages with a single template), to have an immediate effect. Gonnym (talk) 07:43, 18 August 2024 (UTC)
no ones owns project pages so no one is forced into anything - by that logic, we should not be forced to use WPBS for a single banner by having big warning sign about it. And just to reiterate (and expand) on what I said above - I don't mind the warning if WPBS is already there (because that makes sense) and I don't care if a bot goes around adding WPBS (even for pages that have a single banner), my only concern is the massive warning given if WPBS isn't on the page already. Primefac (talk) 10:40, 18 August 2024 (UTC)
(No it's not too late to object!) We certainly can (and should) remove the message from non-article pages. For a start the message is incorrect, because these pages are detected automatically so don't even have a |class= parameter that needs transferring. What about mainspace though? We have no efficient method (that I know of) to detect the number of banners on a page, so we have to treat one banner the same as 8 banners. In mainspace we absolutely do want WPBS on every talk page. We are now 18 months into the new system, and it seems that a little editor education is needed, which is what the warning is trying to do. — Martin (MSGJ · talk) 19:26, 18 August 2024 (UTC)
We also have a bot that, once the backlog is cleared, will fix/update any new pages that aren't following PIQA. Just a thought. It probably makes editors complacent (look how many dated maintenance tags get tagged by AnomieBOT every day instead of folks just putting the date, which is piss-easy) but that's why we have bots like this in the first place. Primefac (talk) 20:10, 18 August 2024 (UTC)
Yeah, the bot is good when it works. For some reason it is not clearing Category:Articles with WikiProject banners but without a banner shell very quickly — Martin (MSGJ · talk) 17:30, 19 August 2024 (UTC)
I have removed the warning (numbered 2 above) in the sandbox. Hopefully the bot will catch up with these soon — Martin (MSGJ · talk) 17:41, 19 August 2024 (UTC)
Deployed to live — Martin (MSGJ · talk) 14:45, 2 September 2024 (UTC)
Thanks. Primefac (talk) 14:52, 2 September 2024 (UTC)

Modifying the module so default values aren't needed to be set

The advantage of invoking the module directly from banner templates is that we don't need to add default values for many of the parameters, so code like |category = {{{category|}}} isn't needed as the module knows it received a parameter with that name. Removing the need to add default parameters like this will make the long and complex banner code easier (and cleaner) to read.

Currently we have 4 types of parameters (if I'm not mistaken):

  1. Parameters that all banners have and use the same parameter name.
  2. Parameters that all banners have but use various names.
  3. Parameters that some banners have but use the same name.
  4. Parameters that some banners have but use various names.

The change needed would be like this:

  • Group 1 is the ideal and easiest candidate to convert. Parameters in this group probably include |category= and |listas=.
  • Group 3 is also easy to convert. Instead of doing something like |class = {{{class|}}}, we can change to |class = yes. Parameters in this group probably include |class= and |importance=.
    • In some cases where the parameter is almost always used, the default can be yes anyways so only when it isn't needed, the banner should set |class = no, reducing the banner code even more.
  • For group 2 and 4, this change will make things more consistent across all banners so instead of something like |image-needed = {{{image|{{{image-needed|{{{needs-image|}}}}}}}}} it will be |image-needed = yes with only one of these names (or we could still leave all versions, messy but works).

Gonnym (talk) 11:13, 3 September 2024 (UTC)

Nice ideas. Just a few comments at this stage.
  • These templates follow a long-standing convention of using upper-case parameter names for configuration settings and lower-case parameter names for passing values. So perhaps |CLASS=yes would be more respectful of that convention, if we wish to retain it.
  • I would prefer to default to "no" in almost every case. There are already plenty of cases of editors using features that they don't actually need.
  • I can't think of any examples of group 2?
  • I suppose the module could check for all reasonable variants of parameter names, e.g. image, imageneeded, image-needed, etc. Or are you suggesting a harmonisation effort?
  • For group 4, we could do something like |TF_1=utah which would tell the module to check the |utah= parameter and link it to task force 1.
  • Currently the module does not look at any of the parent frame arguments (i.e. parameters passed from a page), it only looks at the frame arguments (i.e. parameters passed from the template), so this would need a fairly major restructure of the code
— Martin (MSGJ · talk) 11:25, 3 September 2024 (UTC)
  • #1: That can work and would also make the conversion smoother as both parameters can work until all banners are converted.
  • #2: A blanket no would be counter-productive here. class is used in almost all banners but a few. Having this line added to all of them instead of only the handful that don't need it is less ideal.
  • #3: Probably one word parameters, so something like |attention=.
  • #4: I'd prefer we harmonize on one name, yes. But that's my personal preference here. Having the module know all versions can work, but will be ugly and messy.
Gonnym (talk) 11:34, 3 September 2024 (UTC)
Ha, your edit to the sandbox will definitely not work without significant other changes! For example it would allow you to use features that the project does not even use. Let's start on a small scale with group 1.
  • listas - I would prefer to move all these to the banner shell and then delete from the banners. So let's work on tracking these instead?
  • substcheck - I have a feeling there is now a much better way to detect if a template has been substituted. So maybe look into that, and hopefully we can do without this parameter altogether.
  • category - this would be a good one to start with, and would prove the concept.
  • demo_page - this is undocumented, but very useful when testing to see how banners behave on different pages. It would be useful if we could use this parameter directly without having to pass through the template.
— Martin (MSGJ · talk) 19:22, 3 September 2024 (UTC)
The edit was just to see if the basic thing breaks (which it didn't so that's good news). If a project banner doesn't support a parameter (as in, the parameter isn't one of the default parameters, or isn't set to "on") then using it from a talk page shouldn't do anything other than place that parameter in the unknown parameter category. Gonnym (talk) 23:01, 3 September 2024 (UTC)

If we start using |CLASS=yes then it might be a good time to stop using |class= altogether, because all of the ratings should now be in the banner shell so this parameter is not needed. The only barrier to this is Category:Articles with conflicting quality ratings which is a massive barrier, and we have made almost no progress in resolving ... — Martin (MSGJ · talk) 07:42, 4 September 2024 (UTC)

Could you in the code sort the pages by the conflicting class? That would probably make it easier to see what issues can be solved with a bot run. Gonnym (talk) 08:34, 4 September 2024 (UTC)
Could sort by class, or alternatively the number of classes that it differs from the PIQA rating (e.g. if class=start and PIQA=B then difference=2). Or we could put use subcategories like Category:Articles with conflicting quality ratings that differ by 1 class, etc. — Martin (MSGJ · talk) 09:40, 4 September 2024 (UTC)
I'd prefer not a number as that doesn't give us any information to work with. A class can show us patterns. This Talk:1876 United States presidential election in Rhode Island, for example, is not a list. If we can single these out then we can start clearing them. Gonnym (talk) 09:58, 5 September 2024 (UTC)
Okay that's fine. But sorting by class is problematic before start/stub and fa/fl start with the same letters. What sort keys would you like to use? — Martin (MSGJ · talk) 11:32, 5 September 2024 (UTC)
It doesn't matter to me, as long as they are different. I'm also quite sure we won't have more than a handful of articles with FA/FL issues, if at all. Maybe place stub as 0. Gonnym (talk) 11:40, 5 September 2024 (UTC)
With this edit we could split out the category into different classes? — Martin (MSGJ · talk) 16:23, 7 September 2024 (UTC)
The subcategories of Category:Articles with conflicting quality ratings have now populated — Martin (MSGJ · talk) 14:36, 12 September 2024 (UTC)
Looking at the 3k pages at Category:List-Class articles with conflicting quality ratings. I think we can safely have a bot run and remove the pages marked as list from all pages except those in the format of "x in y" (Talk:1962 in anime). There might be some false positives, but that isn't something that can't be fixed manually when someone sees it. All the others aren't lists, but low-quality articles.
The pages in Category:GA-Class articles with conflicting quality ratings seem to be Military History articles tagged as "A". So in this case (and probably also in all other categories) we can decide to go with the higher tagged page, as an editor intentionally decided that article was that level (it's not our job here to check if we agree or not, just to fix the conflict). The stub pages can be double checked if the article itself still has a stub template, if it doesn't, it's not a stub. Gonnym (talk) 16:28, 12 September 2024 (UTC)
I like these suggestions — Martin (MSGJ · talk) 17:34, 12 September 2024 (UTC)

The code for using parent arguments for category and demo_page is now coded on sandbox, if you'd like to check it — Martin (MSGJ · talk) 21:09, 5 September 2024 (UTC)

Tested the category=no at Draft talk:Template:Test banner and looks good. Gonnym (talk) 15:47, 6 September 2024 (UTC)

living/blp on categories

Is Template talk:WikiProject banner shell/Archive 11#living/blp on categories not valid anymore? I see categories have started filtering into Biography articles without living parameter when living/blp parameters are not present. Do we really want/need to add living/blp to the ~500k cats under Category-Class biography articles?   ~ Tom.Reding (talkdgaf)  18:05, 9 September 2024 (UTC)

Seems a bit pointless to add that parameter to a category. Gonnym (talk) 19:17, 9 September 2024 (UTC)
And templates. The maintenance burden will be massive.   ~ Tom.Reding (talkdgaf)  19:24, 9 September 2024 (UTC)
Should we also exclude disambiguation pages and redirects? — Martin (MSGJ · talk) 22:37, 10 September 2024 (UTC)
No, I don't think mainspace dabs & #Rs should be excluded. If they were excluded, then they could slip through to an easy circumvention of WP:NOINDEX.
Now that you mention it...ideally, it'd be nice from a maintenance perspective if dabs & #Rs inherited their target's status, if it exists (for cases where both the dab/#R and its target are tagged with {{WP Bio}}).   ~ Tom.Reding (talkdgaf)  08:07, 11 September 2024 (UTC)
You mean that if an article is a GA, then the dab page should be set to GA? Gonnym (talk) 08:48, 11 September 2024 (UTC)
Gonnym, we're talking about the |blp= or |living= parameters here. I'm not sure inheriting the status of the target would be appropriate. For example Matt Doherty Jr. redirects to the article on his father Matt Doherty Sr.. The former is alive but the latter is not — Martin (MSGJ · talk) 08:50, 11 September 2024 (UTC)
Inheritance could be the weak default, as long as |blp=/|living= are blank, but perhaps able to be forced with |blp=inherit/|living=inherit. Values of yes|no etc. would override any inheritance.   ~ Tom.Reding (talkdgaf)  09:15, 11 September 2024 (UTC)
I can't understand why you would want to use the living parameter on a disambiguation page. In almost every case there will be some people living and some not. There is also no content on a dab page, so little cause for BLP concerns — Martin (MSGJ · talk) 07:59, 19 September 2024 (UTC)
I may be straying out of my depth, but any dab with a living main/1st target could/should conceivably use |blp=yes, for example Talk:Joey Lawrence (disambiguation), Talk:Sai Kumar, etc. I'm surprised Talk:Madonna (disambiguation) doesn't even use {{WP Bio}}, but so be it.   ~ Tom.Reding (talkdgaf)  13:12, 19 September 2024 (UTC)
This was an unintended consequence of a new module to check parameters Module:Check blp parameter. It should be fixed now — Martin (MSGJ · talk) 19:43, 9 September 2024 (UTC)

If a page has |blpo=yes then presumably it should not be in Category:Biography articles without living parameter, correct? — Martin (MSGJ · talk) 08:55, 11 September 2024 (UTC)

The wording of Template:WikiProject Biography#Living people, active politicians and other BLP issues under |blpo= says "It can only be used if |living=no", so I don't think |blpo=yes on its own is enough to exclude it from Category:Biography articles without living parameter. I don't know if that dual requirement is a requirement of the previous template coding/logic, or if it was intended to be that way regardless. It does seem redundant to supply |living= for either |living=no|blpo=yes or |living=yes|activepol=yes, but I've never asked nor looked through WT:Biography/{{WP Bio}} about this.   ~ Tom.Reding (talkdgaf)  10:03, 11 September 2024 (UTC)

Can anyone help wit Category:Pages using WikiProject Biography with conflicting living parameter? I took the weekend off, and now it's got 0 pages in it — Martin (MSGJ · talk) 07:38, 16 September 2024 (UTC)

I've fixed a few but I noticed that a bot can easily fix most if not all of these and just needs to check if a page is in that category and also in Category:Living people. Gonnym (talk) 09:12, 16 September 2024 (UTC)