Module talk:WikiProject banner/Archive 14
![]() | This is an archive of past discussions about Module:WikiProject banner. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 10 | ← | Archive 12 | Archive 13 | Archive 14 | Archive 15 | Archive 16 |
Discussion at Wikipedia talk:Content assessment § Proposal: Reclassification of Current & Future-Classes as time parameter
You are invited to join the discussion at Wikipedia talk:Content assessment § Proposal: Reclassification of Current & Future-Classes as time parameter. There is a proposal to split "current" & "future" classes into a new parameter "time", in order to standardise article-rating across Wikipedia (per RfC), while also allowing simultaneous usage of quality criteria and time for interest projects. Thanks! —CX Zoom[he/him] (let's talk • {C•X}) 07:28, 2 July 2023 (UTC)
Red links for inactive projects
See Talk:Hoekstra, the class List is red for Frisia because it does not have a category because its an inactive project. Christian75 (talk) 09:05, 29 June 2023 (UTC)
That's not even supposed to appear. Will check it out ...— Martin (MSGJ · talk) 09:12, 29 June 2023 (UTC)- I think such categories should be tracked and created. We did reach a consensus to retain inactive WikiProject banner, but not much work has been done yet on that front. —CX Zoom[he/him] (let's talk • {C•X}) 09:21, 29 June 2023 (UTC)
I am trying to work out if this rating has just appeared with the module conversion, or whether it has been like that since 10 May?— Martin (MSGJ · talk) 09:23, 29 June 2023 (UTC)
Just to clarify that the template is working as expected. This was a compromise after the long discussion at Wikipedia:Village pump (miscellaneous)/Archive 73#Improper handling of assessment for inactive WikiProjects. If you don't like the red links, would you prefer this to be de-linked, or would you prefer the whole row is hidden in the banner? Personally I don't think there was consensus to recreate all those categories, but any WikiProject being "revived" can of course do so — Martin (MSGJ · talk) 13:35, 2 July 2023 (UTC)
Script errors
Template:WikiProject Portals seems to be generating script errors, e.g. on Wikipedia talk:Featured portal review but the errors are not visible on the page, they are just populating the category — Martin (MSGJ · talk) 09:13, 3 July 2023 (UTC)
- Another thing, {{WikiProject Portals|historical=y}} doesn't populated the "historical" category, but {{WikiProject Portals}} does. —CX Zoom[he/him] (let's talk • {C•X}) 09:29, 3 July 2023 (UTC)
- Seems a bit of a mess. User:MJL has worked on this template in the past, maybe he/she can help? — Martin (MSGJ · talk) 09:49, 3 July 2023 (UTC)
- It was an issue with note 4. Now fixed. -- WOSlinker (talk) 12:15, 3 July 2023 (UTC)
- Thanks WOS! — Martin (MSGJ · talk) 13:34, 3 July 2023 (UTC)
- @MSGJ: [Thank you for the ping] For the record, I use they/them pronouns rather than he/she.
Glad this got solved. While I did attempt to work on that template in the past, I self-reverted all my changes when I broke something. I probably wasn't going to be much of a help here. –MJL ‐Talk‐☖ 17:12, 3 July 2023 (UTC)
- It was an issue with note 4. Now fixed. -- WOSlinker (talk) 12:15, 3 July 2023 (UTC)
- Seems a bit of a mess. User:MJL has worked on this template in the past, maybe he/she can help? — Martin (MSGJ · talk) 09:49, 3 July 2023 (UTC)
minor comment on Module:WikiProject banner
Just a minor comment: the invocation of banner_rows:allDone()
on line 614 is essentially a no-op, as the return value isn't being stored. isaacl (talk) 21:22, 4 July 2023 (UTC)
- Understood. When I first coded this I assumed the done() were required in order to close the tags. Then I noticed that none of your examples on WT:LUA had them so guessed that tags were closed automagically. — Martin (MSGJ · talk) 21:26, 4 July 2023 (UTC)
- Sure, if you had a mental model of an ongoing string of text being built up, I understand how you might think this. What happens though is that the function calls build a tree of objects representing the HTML. When
tostring()
is invoked on the banner variable, the tree is rendered into HTML, and thus as the tree is traversed, the corresponding start and end tags will be generated. isaacl (talk) 22:00, 4 July 2023 (UTC)
- Sure, if you had a mental model of an ongoing string of text being built up, I understand how you might think this. What happens though is that the function calls build a tree of objects representing the HTML. When
Script error if no image
@MSGJ: If a banner has no image set then it's displaying a script error at the moment. For example: {{WikiProject Dictionary of National Biography}} or {{WikiProject Anatolian Civilizations task force}}. -- WOSlinker (talk) 06:36, 7 July 2023 (UTC)
- Thanks, this should now be fixed — Martin (MSGJ · talk) 07:44, 7 July 2023 (UTC)
Adding redirect class
At Wikipedia talk:WikiProject Council#Proposed changes to extended quality scale I proposed adding redirect-class to the standard extended scale, because lots of projects use it. There has been no opposition in nearly a month so I will look at implementing this shortly.
In order to avoid creating lots of new categories, while also avoiding red categories appearing on pages, I suggest we add an existence check to the module code so that:
- If Category:Redirect-Class PROJECT articles exists then it will be used by projects using the extended scale.
- If Category:Redirect-Class PROJECT articles does not exist then redirects will continue to be placed in Category:NA-Class PROJECT articles
This will give projects a choice: if they want to track redirects then they can just create the category. If this approach works, we could roll it out to other non-article classes like Portals too. — Martin (MSGJ · talk) 13:21, 27 June 2023 (UTC)
- Now coded on the sandbox — Martin (MSGJ · talk) 22:09, 4 July 2023 (UTC)
- This is now deployed. FWIW I think we could now use the "full quality scale" aka the "extended scale" for all projects. Based on the same logic the class will only be used if the category exists, otherwise it will just use NA-class. — Martin (MSGJ · talk) 12:14, 7 July 2023 (UTC)
Appearance of nested version
There are some interesting ideas/proposals being discussed at Template talk:WikiProject banner shell#How project banners should look which would affect the nested display of this template. You are encouraged to add your thoughts ... — Martin (MSGJ · talk) 11:47, 7 June 2023 (UTC)
- Consensus is starting to emerge. Any other comments would be welcome at Template talk:WikiProject banner shell#Moving ahead? — Martin (MSGJ · talk) 11:43, 30 June 2023 (UTC)
- New design has been deployed! — Martin (MSGJ · talk) 12:28, 6 July 2023 (UTC)
Why are all banners white when collapsed instead of the usual beige?
This is jarringly awful. Please restore the previous colour scheme. Headbomb {t · c · p · b} 18:51, 6 July 2023 (UTC)
- The left-alignment is also similarly jarring. Having things centered was so much better. Headbomb {t · c · p · b} 18:53, 6 July 2023 (UTC)
- There was a discussion at WikiProject banner shell. -- WOSlinker (talk) 19:02, 6 July 2023 (UTC)
- In which the four choices presented were white, white, white, and white. Some discussion. —David Eppstein (talk) 20:20, 6 July 2023 (UTC)
- I honestly could not see anything on the page after looking at the banner on this talk page. All the text swam, I saw dots and my head is still pounding. Way too many bright colors and far too much sensory input. SusunW (talk) 20:37, 6 July 2023 (UTC)
- It both looks terrible and is just painful on the eyes in various ways. SilverserenC 22:19, 6 July 2023 (UTC)
- That's a glitch caused post-deployment, because a project banner transcluded further up the page is overriding the CSS of the mockups. This is how they looked.
- Anyway, the consensus for a white background was only slim, so feel free to join the discussion there. DFlhb (talk) 00:03, 7 July 2023 (UTC)
- I honestly could not see anything on the page after looking at the banner on this talk page. All the text swam, I saw dots and my head is still pounding. Way too many bright colors and far too much sensory input. SusunW (talk) 20:37, 6 July 2023 (UTC)
- In which the four choices presented were white, white, white, and white. Some discussion. —David Eppstein (talk) 20:20, 6 July 2023 (UTC)
- There was a discussion at WikiProject banner shell. -- WOSlinker (talk) 19:02, 6 July 2023 (UTC)
Notification for everyone above (Headbomb, WOSlinker, David Eppstein, SusunW, DFlhb): An RfC was started at Template_talk:WikiProject_banner_shell#RFC_on_WikiProject_Banner_shell_redesign. SilverserenC 18:10, 9 July 2023 (UTC)
Script error complaining about "quality" function

Template talk:Airport destination list is displaying [[Category:Script error: The function "quality" does not exist.-Class airport articles]]
. I did a null edit, but I haven't tried to troubleshoot it. I'm assuming that it is related to the changes here. – Jonesey95 (talk) 12:31, 7 July 2023 (UTC)
- This is also happening at Talk:Agra, and there are a few thousand pages in Category:Pages with script errors (increasing rapidly!), where there are usually only a few hundred pages. Most of the pages in the category are some flavor of Talk page. – Jonesey95 (talk) 12:35, 7 July 2023 (UTC)
- That'll probably be this edit, which removed the function. Cant undo it since its an admin protected page. Aidan9382 (talk) 12:40, 7 July 2023 (UTC)
- Yes, I came here to say just that and to ping MSGJ. – Jonesey95 (talk) 12:42, 7 July 2023 (UTC)
- Thanks to MSGJ for the quick response. This change has been reverted. The script error category population is decreasing now. Affected pages may require a null edit. – Jonesey95 (talk) 12:51, 7 July 2023 (UTC)
- Yes, I came here to say just that and to ping MSGJ. – Jonesey95 (talk) 12:42, 7 July 2023 (UTC)
- That'll probably be this edit, which removed the function. Cant undo it since its an admin protected page. Aidan9382 (talk) 12:40, 7 July 2023 (UTC)
Apologies. All those functions were moved to Module:WikiProject banner but I forgot there were a few bespoke banners that were still calling them there. I wish there was an easy way to find which templates were calling certain functions in modules. — Martin (MSGJ · talk) 12:52, 7 July 2023 (UTC)
- {{WPBannerMeta/hooks/qualimpintersect}} appears to call
{{#invoke:Class mask|quality
. That might be a clue. This list doesn't look too bad. – Jonesey95 (talk) 12:58, 7 July 2023 (UTC)- Here's another clue. – Jonesey95 (talk) 13:00, 7 July 2023 (UTC)
- Thanks I will catch them all before deploying that again — Martin (MSGJ · talk) 10:22, 10 July 2023 (UTC)
- Here's another clue. – Jonesey95 (talk) 13:00, 7 July 2023 (UTC)
Script error at Talk:Ch'p possibly related to changes
Talk:Ch'p is currently displaying Lua error in Module:WikiProject_banner at line 583: attempt to perform arithmetic on local 'hook_collapsed' (a nil value). – Jonesey95 (talk) 19:11, 11 July 2023 (UTC)
- This is a correct report of a bug in the code, which I have now fixed in the sandbox. Thanks — Martin (MSGJ · talk) 22:07, 11 July 2023 (UTC)
- Thanks for undeleting my message. I had fixed this instance with a hammer instead of a screwdriver. Your way is better. – Jonesey95 (talk) 11:19, 12 July 2023 (UTC)
Too many expensive function calls
Now that we support an indefinite number of task forces, the category checks on /templatepage are getting too expensive. For example see Template:WikiProject Caribbean/sandbox which has 28 task forces, each one checking for 12 quality and 7 importance categories. It is easy to see how the limit of 500 is passed. We could limit the category checks to the first 10 task forces, or perhaps we could be clever and check a random selection of 10 task forces. — Martin (MSGJ · talk) 22:08, 12 July 2023 (UTC)
- What differs from the status quo and this? The maximum number of taskforces might be infinite, but the number actually in use remains the same. —CX Zoom[he/him] (let's talk • {C•X}) 22:25, 12 July 2023 (UTC)
- Before the module we could only check categories for 5 task forces, but now it's trying to check for all of them. — Martin (MSGJ · talk) 22:27, 12 July 2023 (UTC)
- Oh, I see. These things might actually be more suited to a bot Database Report if expensive calls are causing issues. But until such time your solution also works. —CX Zoom[he/him] (let's talk • {C•X}) 22:32, 12 July 2023 (UTC)
- Maybe just keep a count of how many checks and don't check once close to 500 and add another note below the banner on the template page saying not all category existance has been checked? -- WOSlinker (talk) 22:40, 12 July 2023 (UTC)
- That's not a bad idea. I've limited the check to tf1-10 for the moment until we figure this out properly. — Martin (MSGJ · talk) 22:45, 12 July 2023 (UTC)
- Random idea coded and the result can be seen on Template:WikiProject Caribbean/sandbox. An advantage is that a different set of categories are checked each time the page is loaded, rather than the same ones each time. — Martin (MSGJ · talk) 23:10, 12 July 2023 (UTC)
- I'm not sure that's an advantage; if I understand correctly, it means the page's quality and importance ratings can change randomly from load to load. I think that would be a more confusing reader experience. isaacl (talk) 00:58, 13 July 2023 (UTC)
- May be we can use a way where the category check is chosen by UTC date. On 1st, the first 5 tf are checked, on 2nd, the next five, and so on until looping back? The template code should have instructions about the same. Maybe also add a debug=yes mode for those trying to debug the template irrespective of the date. It should not be part of the permanent template code though. If possible a preview-only effect would be appreciated. —CX Zoom[he/him] (let's talk • {C•X}) 05:02, 13 July 2023 (UTC)
- I still think that would be confusing for readers. isaacl (talk) 06:35, 13 July 2023 (UTC)
- There is nothing we are discussing which would affect readers. These are about some warnings that appear on the template page if certain required categories do not exist. — Martin (MSGJ · talk) 07:08, 13 July 2023 (UTC)
- I apologize for misunderstanding. Personally, I still am not a fan of non-deterministic behaviour; perhaps the page can be placed in a tracking category that can be used by a bot or user script to perform full validation. isaacl (talk) 16:22, 13 July 2023 (UTC)
- Bot idea is preferable, but that would need a bot operator willinf to take up this recurring task. —CX Zoom[he/him] (let's talk • {C•X}) 16:30, 13 July 2023 (UTC)
- I agree with both points; I suggested a user script as an option if no one volunteers to run a bot. isaacl (talk) 16:35, 13 July 2023 (UTC)
- Let's ask at WP:BOTREQ and see if anyone takes it up. Here is my draft message. Feel free to modify it in any way that makes the message concise, clearer, and correct.
- "For every WikiProject banner, {{WPBannerMeta}} detects whether the quality/assessment categories required for its taskforces are created or not, and creates a warning and also populates Category:WikiProject banners with formatting errors. Until recently, this template check was limited to the first 5 taskforces. But several banners already use more than 5 taskforces. Recently, the banners were switched to module, it is able to run a category check on any number of taskforces, but leads to too many expensive function calls. Thus, a bot that runs regularly to generate a report of category checks is required. The relevant code is already available in wikitext/Lua format. Thanks!"
- —CX Zoom[he/him] (let's talk • {C•X}) 18:32, 13 July 2023 (UTC)
- Bot idea is preferable, but that would need a bot operator willinf to take up this recurring task. —CX Zoom[he/him] (let's talk • {C•X}) 16:30, 13 July 2023 (UTC)
- I apologize for misunderstanding. Personally, I still am not a fan of non-deterministic behaviour; perhaps the page can be placed in a tracking category that can be used by a bot or user script to perform full validation. isaacl (talk) 16:22, 13 July 2023 (UTC)
- There is nothing we are discussing which would affect readers. These are about some warnings that appear on the template page if certain required categories do not exist. — Martin (MSGJ · talk) 07:08, 13 July 2023 (UTC)
- Daily changes sounds good - do you want to code that? Not sure how your debug option would work, but feel free to sandbox that as well — Martin (MSGJ · talk) 12:21, 13 July 2023 (UTC)
- I still think that would be confusing for readers. isaacl (talk) 06:35, 13 July 2023 (UTC)
- May be we can use a way where the category check is chosen by UTC date. On 1st, the first 5 tf are checked, on 2nd, the next five, and so on until looping back? The template code should have instructions about the same. Maybe also add a debug=yes mode for those trying to debug the template irrespective of the date. It should not be part of the permanent template code though. If possible a preview-only effect would be appreciated. —CX Zoom[he/him] (let's talk • {C•X}) 05:02, 13 July 2023 (UTC)
- I'm not sure that's an advantage; if I understand correctly, it means the page's quality and importance ratings can change randomly from load to load. I think that would be a more confusing reader experience. isaacl (talk) 00:58, 13 July 2023 (UTC)
- Maybe just keep a count of how many checks and don't check once close to 500 and add another note below the banner on the template page saying not all category existance has been checked? -- WOSlinker (talk) 22:40, 12 July 2023 (UTC)
- Oh, I see. These things might actually be more suited to a bot Database Report if expensive calls are causing issues. But until such time your solution also works. —CX Zoom[he/him] (let's talk • {C•X}) 22:32, 12 July 2023 (UTC)
- Before the module we could only check categories for 5 task forces, but now it's trying to check for all of them. — Martin (MSGJ · talk) 22:27, 12 July 2023 (UTC)
Add a warning that messing with categories could affect bots that make use of those categories, like WP:AALERTS and WP:RECOG.
I was sure we had such a warning before, but I can't find it anywhere. Basically, on the main template page, e.g. Template:WikiProject Sweden, in the box that says "This WikiProject banner uses...", add the following text
- Several workflows and processes on Wikipedia depend on the configuration of the WikiProject banner. When merging, renaming, or updating your banners, categories, projects or taskforces, you may have to update the configuration of your WP:AALERTS, WP:CLEANUPLISTINGS, WP:RECOG, etc. When in doubt, ask on your WikiProject's talk page or at WT:AALERTS, WT:CLEANUPLISTINGS, WT:RECOG, etc.
Headbomb {t · c · p · b} 14:04, 15 July 2023 (UTC)
- I'm not crazy, we did have such a warning before. Headbomb {t · c · p · b} 14:04, 15 July 2023 (UTC)
- Yeah, this is a reasonable warning that should be shown to editors because lots of stuffs can break if changes aren't done correctly. —CX Zoom[he/him] (let's talk • {C•X}) 21:00, 18 July 2023 (UTC)