Template talk:Progress box
If no catchall
[edit]IE no parameter 3, should add all components. Rich Farmbrough, 15:48, 31 May 2009 (UTC).
need to allow for subcats.
[edit]Rich Farmbrough, 21:07, 31 May 2009 (UTC).
Just tidy the totals...
[edit]Rich Farmbrough, 21:06, 3 June 2009 (UTC).
And lc
[edit]Rich Farmbrough, 21:06, 3 June 2009 (UTC).
- Fixed Pascal fixed. TY. Rich Farmbrough, 21:25, 5 June 2009 (UTC).
And empty parameters
[edit]Rich Farmbrough, 21:06, 3 June 2009 (UTC).
And #ifexist All...
[edit]Rich Farmbrough, 20:14, 25 June 2009 (UTC).
These should exist
[edit](but will likely be redirects)
- Template:Accuracy disputes progress
- Template:User-created public domain images without user-name progress
- Template:Unreferenced BLPs progress
- Template:Wikipedia articles needing clarification progress
- Template:Category needed progress
- Template:Articles lacking in-text citations progress
- Template:Articles with broken or outdated citations progress
- Template:Cleanup by month progress
- Template:Articles needing coordinates progress
- Template:Wikipedia articles needing copy edit progress
- Template:Current events progress
- Template:Dead-end pages progress
- Template:Articles with dead external links progress
- Template:Articles with disputed statements progress
- Template:Deprecated templates progress
- Template:Articles to be expanded progress
- Template:Articles needing expert attention progress
- Template:Merge by month progress
- Template:NPOV disputes progress
- Template:Articles with topics of unclear notability progress
- Template:Articles that may contain original research progress
- Template:Orphaned articles progress
- Template:Wikipedia articles with plot summary needing attention progress
- Template:Recently revised progress
- Template:Articles needing additional references progress
- Template:Articles lacking reliable references progress
- Template:Articles with sections needing rewrite progress
- Template:Articles lacking sources progress
- Template:Articles to be split progress
- Template:Articles with trivia sections progress
- Template:Uncategorized stubs progress
- Template:Wikipedia articles needing style editing progress
- Template:Articles with unsourced statements progress
- Template:Wikipedia articles needing factual verification progress
- Template:Articles that need to be wikified progress
- Template:Articles slanted towards recent events progress
- Template:Articles with minor POV problems progress
- Template:Articles with weasel words progress
- Template:Articles with specifically-marked weasel-worded phrases progress
Rich Farmbrough, 21:24, 3 June 2009 (UTC). Fixed
Factor
[edit]Works perfectly now... except;
Where the undated cat does not contain the dated cats. Need an "adjust off" paramter. <sigh/> Rich Farmbrough, 08:18, 1 September 2010 (UTC).
- Speaking of which ... How does one use the debug parameter quoted on the template documentation page "then the "debug" parameter will display the calculation in the progress box"
- I tried to add it as {{Progress box|debug|Wikipedia articles needing copy edit|Wikipedia articles needing copy edit|All articles needing copy edit}} - this seems to work, but returns an error: Undated articles Expression error: Unrecognised word "all", as well as returning the All articles totals as 26.
- I have it in my sandbox - User:Chaosdruid/sandbox1 Chaosdruid (talk) 01:54, 1 February 2011 (UTC)
- "debug=yes" does the trick.
- Wikipedia articles needing copy edit
Subtotals July 2023 15 August 2023 69 September 2023 93 October 2023 149 November 2023 100 December 2023 115 January 2024 128 February 2024 97 March 2024 131 April 2024 223 May 2024 157 June 2024 125 July 2024 181 August 2024 155 September 2024 149 October 2024 145 November 2024 161 December 2024 243 Undated articles 0 2,436 - Hope that explains it. Rich Farmbrough, 23:45, 17 May 2011 (UTC).
Progress box not counting properly?
[edit]I'm not sure why this is happening, but {{Dead link progress}} is well over 100,000 but the template only lists 92,000. I tried purging the template, but it doesn't seem to help. The adjustment factor is 0 so that shouldn't be an issue as far as I can tell.
Maybe it's an issue with {{Progress box}} or perhaps {{Progress line 3}} or {{Progress line 4}}. I can't tell as I don't understand it. Could somebody take a look at this, please? Thanks. - Hydroxonium (H3O+) 10:44, 2 February 2011 (UTC)
- OK it's a bit of a pain - Progress box works slightly differently if there is an "All X" category - it uses the number of elements in that category (to reduce the cost of the fairly expensive template). For many reasons this is not always the true "all" value, nor is the total count necessarily the true "all" value since articles can be in more than one dated sub-cat. Possibly the best solution is to remove the code that looks at the "all articles with problem x" cat, and just rely on arithmetic. Feel free to ping me on my talk page for issues with this template. Rich Farmbrough, 23:28, 17 May 2011 (UTC).
Some boxes getting too long
[edit]Could someone please implement a "hide" or "collapse" by default option? Many of these are getting to be very large and when transcluded onto category pages, leaving huge blank whitespaces that must be scrolled through all the way down just to get to the actual category contents. -- Ϫ 11:50, 14 May 2011 (UTC)
- I added a
|state=
parameter, which currently defaults to "uncollapsed". If there are no objections, I can change this to "collapsed". Also, let me know if you have a better suggestion for the title. I went with "Monthly totals" as a first guess. Thanks! Plastikspork ―Œ(talk) 23:28, 14 May 2011 (UTC)- This change has made the box act funny, with the data all squished over to the left. --Diannaa (Talk) 02:51, 15 May 2011 (UTC)
- Strange. I think it's fixed now. Thanks! Plastikspork ―Œ(talk) 03:22, 15 May 2011 (UTC)
- Too strange for me :) Thanks for fixing. Regards, --Diannaa (Talk) 03:29, 15 May 2011 (UTC)
- Strange. I think it's fixed now. Thanks! Plastikspork ―Œ(talk) 03:22, 15 May 2011 (UTC)
- Awesome!! It's perfect now! Thanks a lot! File:Thumbsup emote.gif I changed it to default to collapsed, If anyone shows up to complain we can discuss it then, but I don't think anyone will mind, this is so much better! -- Ϫ 17:18, 15 May 2011 (UTC)
- I am delighted to see that people use it! Sorry I didn't reply to the various queries above. Rich Farmbrough, 23:23, 17 May 2011 (UTC).
- I am delighted to see that people use it! Sorry I didn't reply to the various queries above. Rich Farmbrough, 23:23, 17 May 2011 (UTC).
- This change has made the box act funny, with the data all squished over to the left. --Diannaa (Talk) 02:51, 15 May 2011 (UTC)
Safesubst
[edit]I have (to a large extent) implemented safesubst in the template, it is not guaranteed to be without problems but seems to work. Rich Farmbrough, 18:28, 29 June 2011 (UTC).
Bug?
[edit]The Template:Wikification progress progress box lists -1 undated articles. How is this possible? Can it be corrected? -Mabeenot (talk) 00:32, 11 September 2011 (UTC)
- I believe I fixed it. The last arg to the template is a "fudge factor" which is subtracted from that total. In this case, it appears this factor is not necessary (so I set it to zero). Thanks! Plastikspork ―Œ(talk) 01:00, 11 September 2011 (UTC)
sandbox update
[edit]I've made some updates to the code which should get it to play more nicely with other templates (most importantly a float
attribute. The code is in the sandbox: if there are no objections I'll sync it with the live code. Chris Cunningham (user:thumperward) - talk 11:55, 22 September 2011 (UTC)
- I've now pushed these changes. Chris Cunningham (user:thumperward) - talk 14:21, 30 September 2011 (UTC)
Extend to seven years
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The sandbox version extends the range covered to seven years, from six, as we now have backlogs longer than six years. The testcase page illustrates. Rich Farmbrough, 23:49, 13 October 2012 (UTC).
- Done --Redrose64 (talk) 12:31, 14 October 2012 (UTC)
Needs extending again
[edit]Category:Articles lacking reliable references from March 2005 is not empty, and that's over seven years ago. -- John of Reading (talk) 12:31, 2 September 2013 (UTC)
- Now it's extended to nine years. – Wbm1058 (talk) 01:09, 5 December 2014 (UTC)
- WOSlinker and Wbm1058, the numbers in the progress box align to the left. They used to align on the right, I believe (and they should, since they are numbers). I don't know when this changed. Can you please check your recent changes to see if one of you made this change? I played with historical versions in the sandbox, but I couldn't figure out the change that needed to happen. – Jonesey95 (talk) 15:54, 23 December 2014 (UTC)
- It was an edit by Technical 13 to Template:Progress line 3 which was wrong & I've fixed it. -- WOSlinker (talk) 16:47, 23 December 2014 (UTC)
- Thanks, that fixed it. Go team! – Jonesey95 (talk) 17:37, 23 December 2014 (UTC)
- It was an edit by Technical 13 to Template:Progress line 3 which was wrong & I've fixed it. -- WOSlinker (talk) 16:47, 23 December 2014 (UTC)
- WOSlinker and Wbm1058, the numbers in the progress box align to the left. They used to align on the right, I believe (and they should, since they are numbers). I don't know when this changed. Can you please check your recent changes to see if one of you made this change? I played with historical versions in the sandbox, but I couldn't figure out the change that needed to happen. – Jonesey95 (talk) 15:54, 23 December 2014 (UTC)
- @WOSlinker and Wbm1058: Now that this has been expanded, and since it uses expensive parser functions, it's failing to work on pages and categories with more than one instance of the template. I stumbled upon this when I found a WP:ORPHANGE contributor in Category:Pages with too many expensive parser function calls because he or she has all three of the progress boxes associated with the project ([1] [2] [3]) on their user page. @Jackmcbarn, Mr. Stradivarius, and PaleAqua: do you think it would be feasible to convert this template to lua and would that even help? The expensive function it is using is pagesincat. This is something that should probably be fixed, let's figure out the best way to do it. I can probably create a userscript that could be used as an on by default gadget, but I'd probably rather not deal with the headache or waste my time like I did with the GAN script I made that was supposed to be a gadget but never got much use. —
{{U|Technical 13}} (e • t • c)
12:18, 13 May 2015 (UTC)- You would still need to query Lua's equivalent of PAGESINCATEGORY for every subcategory if you converted it to Lua, and they would still all be expensive parser functions, so it wouldn't help with pages exceeding the expensive parser function limit. However, converting the template to Lua would mean that you wouldn't have to keep extending it every year. — Mr. Stradivarius ♪ talk ♪ 12:38, 13 May 2015 (UTC)
- Changing #ifexists into a #ifexpr PAGESINCATEGORY in Template:Progress line 3/sandbox reduces the expensive parser functions. Compare
{{Progress box|Articles with weasel words|float=right}}
(Expensive parser function count: 221/500) with{{Progress box/sandbox|Articles with weasel words|float=right}}
(Expensive parser function count: 113/500) -- WOSlinker (talk) 12:41, 13 May 2015 (UTC)- I hadn't noticed the ifexist. Last week was finals and I have a couple projects due this week so my brain is a little fried. I noticed it was 221 per call, so 113 is much better. This will allow up to four boxes to be on a single page. I think this is reasonable for most cases. You have no objection from me to push that change through to live WOSlinker. —
{{U|Technical 13}} (e • t • c)
12:52, 13 May 2015 (UTC)
- (edit conflict) Hmm, I didn't notice that there was an #ifexist in there as well. Getting rid of the #ifexist would mean possible false positives for categories that exist but are empty, which I am guessing would make the subtotal list look odd by skipping months. Luckily, there is a way to use Lua to check for existence while still exponentially reducing the number of expensive parser function calls. Assuming there are no gaps in the category series where categories are being used but haven't actually been created, we can use a binary search algorithm to find the earliest existing category, and then assume that more recent categories exist even though we haven't checked them. This is the same basic approach used by Module:Highest archive number. — Mr. Stradivarius ♪ talk ♪ 12:58, 13 May 2015 (UTC)
- Ok, now live. The change should be the same as the #ifexist since empty cats get deleted. -- WOSlinker (talk) 18:18, 13 May 2015 (UTC)
- Ah, I see now - they get deleted as in "speedily deleted by an admin as G6", not as in "the template doesn't display them". So using #ifexpr will result in less expensive parser functions, and we can't use the binary search method anyway as there could well be monthly categories after the oldest ones that have been deleted. If we do convert this to Lua (and I've made a tentative start at Module:Progress box), it makes me wonder how we could find the oldest monthly category for each category group, given that we can't use binary search. The only way that comes to mind is to start at the date of the oldest maintenance category in the whole of Wikipedia, and work upwards from there, testing PAGESINCATEGORY until we find the first non-zero one. The problem with that is that we would keep having to update the date as the categories get cleared out. Perhaps we could automate that with a bot, but if anyone has a non-bot suggestion I would love to hear it. — Mr. Stradivarius ♪ talk ♪ 14:45, 14 May 2015 (UTC)
- Mr. Stradivarius, I have no idea what access to the API that Lua has, but...
- https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&list=allcategories&format=json&acprefix=Orphaned%20articles%20from&acmin=1&aclimit=max&acprop=size&rawcontinue=
- https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&list=allcategories&format=json&acprefix=Attempted%20de-orphan%20from&acmin=1&aclimit=max&acprop=size&rawcontinue=
- https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&list=allcategories&format=json&acprefix=Low%20linked%20articles%20from&acmin=1&aclimit=max&acprop=size&rawcontinue=
- for some examples of how I would pull that information for a JavaScript. I don't know if you can do something like that and then just sort the categories by age with Lua or what. —
{{U|Technical 13}} (e • t • c)
15:03, 14 May 2015 (UTC)
- Mr. Stradivarius, I have no idea what access to the API that Lua has, but...
- Ah, I see now - they get deleted as in "speedily deleted by an admin as G6", not as in "the template doesn't display them". So using #ifexpr will result in less expensive parser functions, and we can't use the binary search method anyway as there could well be monthly categories after the oldest ones that have been deleted. If we do convert this to Lua (and I've made a tentative start at Module:Progress box), it makes me wonder how we could find the oldest monthly category for each category group, given that we can't use binary search. The only way that comes to mind is to start at the date of the oldest maintenance category in the whole of Wikipedia, and work upwards from there, testing PAGESINCATEGORY until we find the first non-zero one. The problem with that is that we would keep having to update the date as the categories get cleared out. Perhaps we could automate that with a bot, but if anyone has a non-bot suggestion I would love to hear it. — Mr. Stradivarius ♪ talk ♪ 14:45, 14 May 2015 (UTC)
- Ok, now live. The change should be the same as the #ifexist since empty cats get deleted. -- WOSlinker (talk) 18:18, 13 May 2015 (UTC)
- I hadn't noticed the ifexist. Last week was finals and I have a couple projects due this week so my brain is a little fried. I noticed it was 221 per call, so 113 is much better. This will allow up to four boxes to be on a single page. I think this is reasonable for most cases. You have no objection from me to push that change through to live WOSlinker. —
- Changing #ifexists into a #ifexpr PAGESINCATEGORY in Template:Progress line 3/sandbox reduces the expensive parser functions. Compare
- You would still need to query Lua's equivalent of PAGESINCATEGORY for every subcategory if you converted it to Lua, and they would still all be expensive parser functions, so it wouldn't help with pages exceeding the expensive parser function limit. However, converting the template to Lua would mean that you wouldn't have to keep extending it every year. — Mr. Stradivarius ♪ talk ♪ 12:38, 13 May 2015 (UTC)
Lua doesn't have any access to the web API, as there are various API calls that could break things if they were accessed during the page parse. So, for instance, at present there is no way to find the members of a category through Lua. — Mr. Stradivarius ♪ talk ♪ 23:32, 14 May 2015 (UTC)
sorting
[edit]Hello, can anyone make it so that I can sort by count? I want to be able to go though the categories with the least members first and work my way up and it is slow having to look through the whole list to figure out which one to do next. Thanks. 3gg5amp1e (talk) 12:33, 14 May 2015 (UTC)
- There's probably a way to do this, but the sort arrows tend to get in the way of the hide/show link, so it will take some experimenting to get it right. For anyone who has time, Help:Collapsing#Sortable tables gives some hints. — Mr. Stradivarius ♪ talk ♪ 14:53, 14 May 2015 (UTC)
- Template:Progress box/sandbox should accomplish it, but I'm wondering if we shouldn't get a consensus for it first. Example on /testcases —
{{U|Technical 13}} (e • t • c)
15:58, 14 May 2015 (UTC)- Well... It works I guess. Why is the [hide/show] in the middle? Why does the sorting arrow show when collapsed? Why is "undated" listed twice? I won't complain if it is the only way to accomplish want I want, but it looks weird at first glance and would take some getting use to. 3gg5amp1e (talk) 16:55, 14 May 2015 (UTC)
- 3gg5amp1e, that is quite simply the best I could do with what I know of that is available. I know there are a few other things that could be tried, but I don't know exactly where the classes are and whatnot in the CSS files that control them or how to use them at this point (I've seen some manipulation of the hide/show things in other ways in an infobox I worked on). The best person I can think of for formatting and CSS stuff would probably be Edokter. Other than that, I'll let my attempt sit in the sandbox for a week and move it live barring any reasonable objections. —
{{U|Technical 13}} (e • t • c)
17:06, 14 May 2015 (UTC)- Oh. Okay, can it be made live now? I'd really like to make use of it. You can always change it later, right? 3gg5amp1e (talk) 17:16, 14 May 2015 (UTC)
- 3gg5amp1e, that is quite simply the best I could do with what I know of that is available. I know there are a few other things that could be tried, but I don't know exactly where the classes are and whatnot in the CSS files that control them or how to use them at this point (I've seen some manipulation of the hide/show things in other ways in an infobox I worked on). The best person I can think of for formatting and CSS stuff would probably be Edokter. Other than that, I'll let my attempt sit in the sandbox for a week and move it live barring any reasonable objections. —
- Well... It works I guess. Why is the [hide/show] in the middle? Why does the sorting arrow show when collapsed? Why is "undated" listed twice? I won't complain if it is the only way to accomplish want I want, but it looks weird at first glance and would take some getting use to. 3gg5amp1e (talk) 16:55, 14 May 2015 (UTC)
- It should not be made live yet. Having "Undated articles" appear twice is a non-starter, but it should be fixable.
- Changing the heading to "Month Year" is a bit odd, at best, although the current "Subtotals" as the heading for the month and year column is not optimal either. How about just "Month"? And should the right-hand column be called "Pages", perhaps?
- Lest this sound like complaining, I like the sortability. We just need to get the bugs out. This template is transcluded 8,300 times, so we can't just throw a wonky version out there. – Jonesey95 (talk) 04:34, 15 May 2015 (UTC)
- Jonesey95, I can change column one to just "Date" and "Pages" or "Members" for column two is fine by me. The reason that Undated is there twice is because it was the only way I could find to always have it at the top of the list without making it a header which threw off the location of the [hide/show] and looked horrible. If you have, or can find another solution, or don't think it should always be at the top (I can make it always on the bottom with
class="sortbottom"
) then I'm game for that. —{{U|Technical 13}} (e • t • c)
05:24, 15 May 2015 (UTC)
- "Date" and "Pages" should work for the column names. "Undated" should always sort at the bottom, I believe; it should never have more than one or two articles in it, since AnomieBot (I think) comes along and date-tags undated maintenance tags quite quickly, in my experience. I could be wrong about some types of tags, however. – Jonesey95 (talk) 05:48, 15 May 2015 (UTC)
- Jonesey95, I can change column one to just "Date" and "Pages" or "Members" for column two is fine by me. The reason that Undated is there twice is because it was the only way I could find to always have it at the top of the list without making it a header which threw off the location of the [hide/show] and looked horrible. If you have, or can find another solution, or don't think it should always be at the top (I can make it always on the bottom with
Lua version
[edit]I've just finished creating a Lua version of this template at Module:Progress box. I've borrowed Template:Progress box/sandbox for a while to test it out. It uses the method I mentioned above to decide what categories to test: it starts at the earliest known maintenance category date on Wikipedia, and then works upwards from there, including categories only if they are not empty. The date of the earliest category is set in Module:Progress box/config (it is currently March 2004, as I found a page in Category:Use mdy dates from March 2004).
I haven't incorporated Technical 13's sorting changes yet, as it looks like there's still some work to do there. Even without sorting, though, there are a few advantages over the old template. First, it won't need updating as time goes on - it will always start counting at March 2004 until someone changes the config value. Also, the counting is more accurate, as it counts the individual dated categories directly rather than relying on the "All" category, which may be out of sync; and it doesn't count subcategories, only pages, so there is no longer any need to jump through hoops to get the correct count. This also renders the system of categories in Category:Counter categories obsolete, and they can be deleted at WP:CFD in due course.
At the moment, the module generates a big red script error if the expensive parser function count is exceeded, but I can change it to fail more gracefully if required. (Personally, I thought the big red error message would be better, as otherwise all the counts would come up as zero, which would be misleading.) Let me know what you think. — Mr. Stradivarius ♪ talk ♪ 06:13, 16 May 2015 (UTC)
- The module is now up live. — Mr. Stradivarius ♪ talk ♪ 02:37, 18 May 2015 (UTC)
Blank lines
[edit]I noticed a problem when opening Category:Articles with a promotional tone: while the page is being loaded, the Progress box is shown in uncollapsed format. After the page finishes loading, the Progress box changes to collapsed mode; the problem lies in that the category doesn't follow it, and a huge blank space is left between the category header and the category items below. I don't know if this problem already happened before the introduction of the Lua module. Can someone please check? Just for the record, I'm using an updated version of the Opera browser. —capmo (talk) 19:59, 30 July 2015 (UTC)
- Seems like a
WebKitBlink bug; it also happens in Chrome, but not in Firefox.-- [[User:Edokter]] {{talk}}
20:03, 30 July 2015 (UTC)- Still happening, and still annoying. Sam Walton (talk) 16:30, 20 December 2015 (UTC)
- Greetings Edokter and Samwalton9 – Recently I posted this issue at WP:VPT and discussion is here. For IE-11 browser the page renders correctly, but not for my Chromium browser. Last entry in discussion mentions a "fix" but no example or instructions on how to do. It's way beyond me. Still needs expert help. Regards, — JoeHebda • (talk) 00:44, 13 April 2016 (UTC)
- Still happening, and still annoying. Sam Walton (talk) 16:30, 20 December 2015 (UTC)
Lua version not including subcategories
[edit]Seems to fail when there are very old cats? sometimes.
Lua error: too many expensive function calls.
Lua error: too many expensive function calls.
All the best: Rich Farmbrough, 13:16, 27 November 2015 (UTC).
- Mr. Stradivarius All the best: Rich Farmbrough, 20:25, 27 November 2015 (UTC).
- Edokter Any idea? All the best: Rich Farmbrough, 00:48, 1 December 2015 (UTC).
- Rich, {{@}} redirects to Template:No spam. I don't think that pings the users. – Wbm1058 (talk) 01:30, 2 December 2015 (UTC)
- What problem are you trying to describe here? I don't see anything wrong in the boxes that you pasted above. – Jonesey95 (talk) 00:51, 1 December 2015 (UTC)
- To take Category:Clean-up categories as an example, Rich is talking about the fact that the category has lots of subcategories, but only two of them appear in the template output for
{{Progress box|Clean-up categories}}
. The reason is that when counting up the categories, the Lua version only counts pages in the category, whereas the previous version counted both pages and subcategories. Only counting pages is good for getting accurate numbers, as often there are extraneous subcategories that need to be excluded from the count. But it does turn out to be a disadvantage for categories that need to count only subcategories. Maybe we could add a|subcategories=yes
parameter or something to force the module to count only subcategories? — Mr. Stradivarius ♪ talk ♪ 02:34, 1 December 2015 (UTC)- OK, I see the problem now. It seems that the problem might be more subtle than that. {{Copyedit progress}} uses Progress box and works fine, for example, even though it is intended to count only subcategories. – Jonesey95 (talk) 02:40, 1 December 2015 (UTC)
- To be precise, the module counts the pages in the category "prefix from month year" where the prefix is the value specified using
{{progress box|prefix}}
. There are pages in, e.g., Category:Wikipedia articles needing copy edit from July 2014, but there are only subcategories in, e.g., Category:Clean-up categories from July 2014. — Mr. Stradivarius ♪ talk ♪ 02:48, 1 December 2015 (UTC)- There is a distinction that MediaWiki doesn't understand between a member category and a subcategory.
- There is (was) a mechanism to give the actual numbers including member categories by using the counter categories to subtract those that are proper sub categories.
- This could be dismantled, perhaps, but there are some cases where sub-cats weren't the obvious ones.
- Or we could make use of it.
- All the best: Rich Farmbrough, 03:28, 1 December 2015 (UTC).
- @Rich Farmbrough: In the case of Category:Clean-up categories, do you mean that the member categories are the ones like Category:Clean-up categories from June 2012, and that the subcategories are the ones like Category:Clean-up categories from 2012? It does make sense to keep the counter categories around to distinguish between these kinds of categories. How about we use the counter categories to generate the total where we have to specify our hypothetical
|subcategories=yes
, and in other cases we use the current method of counting pages? That would enable us to delete most of the counter categories while still being able to get the correct count for the ones where counter categories are necessary. Also, what do you think about the naming of the|subcategories=
parameter? Perhaps something like|count=subcats
would be better? — Mr. Stradivarius ♪ talk ♪ 06:37, 1 December 2015 (UTC)
- @Rich Farmbrough: In the case of Category:Clean-up categories, do you mean that the member categories are the ones like Category:Clean-up categories from June 2012, and that the subcategories are the ones like Category:Clean-up categories from 2012? It does make sense to keep the counter categories around to distinguish between these kinds of categories. How about we use the counter categories to generate the total where we have to specify our hypothetical
- Yes I believe you have the situation spot on.
- The solution with another parameter would work, only problem is if someone adds "subcats=yes" the progress box won't automagically cope, because the counter cats won't exist.
- Keeping track of the subcats is three-fold, firstly the monthly sub-cats which the Lua module knows about, secondly the redundant-and-should-be-deleted "All..." categories (which it also knows about) and thirdly anomalous categories.
- These anomalous categories are only really important for the "undated" calculation, and for categories that
- Can legitimately have member categories
- Have a sub-category that is not part of the design "scheme" (I.E. if someone things one clean-up category is a special case of another.)
- If we forbid nesting the top level categories the problem
goes awayis tractable in code. - All the best: Rich Farmbrough, 00:05, 3 December 2015 (UTC).
- P.S. the issue with the files is presumably that the module doesn't include the File: namespace when counting members. R.F. 2015-12-3Z00:07
- I've added a
|count=
parameter for people to manually specify what they want to be counted. I've only found three places where it's needed - Category:Clean-up categories, Category:Categories for discussion, and Category:Wikipedia categories needing cleanup - and I've added the parameter to all of them. Hopefully that is all that needs doing, but let me know if you spot any more issues. — Mr. Stradivarius ♪ talk ♪ 11:38, 20 January 2016 (UTC) - Update: I see I was forgetting the file categories. I've now switched over Template:User-created public domain files progress and Template:User-created public domain files (no Commons) progress to the new syntax. — Mr. Stradivarius ♪ talk ♪ 11:44, 20 January 2016 (UTC)
- I've added a
- To be precise, the module counts the pages in the category "prefix from month year" where the prefix is the value specified using
- OK, I see the problem now. It seems that the problem might be more subtle than that. {{Copyedit progress}} uses Progress box and works fine, for example, even though it is intended to count only subcategories. – Jonesey95 (talk) 02:40, 1 December 2015 (UTC)
- To take Category:Clean-up categories as an example, Rich is talking about the fact that the category has lots of subcategories, but only two of them appear in the template output for
Lua error: too many expensive function calls.
Lua error: too many expensive function calls.
Template:Progress box old
[edit]Four templates link to "Template:Progress box old":
With the Lua conversion of {{Progress box}} addressing the template limitations which led to its creation, {{Progress box old}} should be made redundant. – Wbm1058 (talk) 19:14, 2 December 2015 (UTC)
I've updated these to use {{Progress box/sandbox}} as temporary fix. The sandbox has the last-implemented pre-Lua version of the template. Wbm1058 (talk) 19:45, 2 December 2015 (UTC)
{{Progress box old}}
will be redundant when the problem identified in the above section is solved.- Until then Wbm1058's workaround is great.
- All the best: Rich Farmbrough, 22:52, 2 December 2015 (UTC).
- I updated Template:Progress box old to support up to 13 years of dated categories. @Mr. Stradivarius: {{Progress box/sandbox}} is again available for any testing needs you might have for it. – Wbm1058 (talk) 22:15, 10 December 2015 (UTC)
- I've converted all of these to use the module's new
|count=
parameter and redirected Template:Progress box old to Template:Progress box. Hopefully this should all be sorted now, but let me know if you spot any problems with the redirect or with the new module code. — Mr. Stradivarius ♪ talk ♪ 11:54, 20 January 2016 (UTC)
- I've converted all of these to use the module's new
- I updated Template:Progress box old to support up to 13 years of dated categories. @Mr. Stradivarius: {{Progress box/sandbox}} is again available for any testing needs you might have for it. – Wbm1058 (talk) 22:15, 10 December 2015 (UTC)
PAGESINCATEGORY is one greater than the count: why?
[edit]See Template:Progress box/testcases. The Lua version shows 392 pages in Category:All dead-end pages. The second page (after the first 200) says "The following 192 pages are in this category, out of 393 total." If there are really 393 pages in the category, why doesn't it show 193 on the second page? {{PAGESINCATEGORY|All dead-end pages}} is 0. What is the "missing" page? Does a page need to be null-edited or something to fix this? Wbm1058 (talk) 00:45, 3 December 2015 (UTC)
- I see: phabricator T85696 and mw:Manual:populateCategory.php – Wbm1058 (talk) 01:15, 3 December 2015 (UTC)
- The answer is that the module sums all of the monthly category counts to find the total, so it may be out of sync with the "all" category. This could be because someone manually added the "all" category or the monthly category to a page, or it could be because of job queue issues/caching issues/bugs in MediaWiki. I understand that having category counts that are both accurate and efficient is a hard problem, at least with the category system as it currently works. — Mr. Stradivarius ♪ talk ♪ 08:49, 20 January 2016 (UTC)
- One of the weak reasons given for creating/keeping the "all" categories was to count the total items. Pre-Lua this made a little sense, and the template only did the addition if there was no "all" cat. All the best: Rich Farmbrough, 03:17, 10 February 2016 (UTC).
- One of the weak reasons given for creating/keeping the "all" categories was to count the total items. Pre-Lua this made a little sense, and the template only did the addition if there was no "all" cat. All the best: Rich Farmbrough, 03:17, 10 February 2016 (UTC).
- The answer is that the module sums all of the monthly category counts to find the total, so it may be out of sync with the "all" category. This could be because someone manually added the "all" category or the monthly category to a page, or it could be because of job queue issues/caching issues/bugs in MediaWiki. I understand that having category counts that are both accurate and efficient is a hard problem, at least with the category system as it currently works. — Mr. Stradivarius ♪ talk ♪ 08:49, 20 January 2016 (UTC)
A couple of things
[edit]I had to trace a strange lineage of templates to get here from Category:Articles containing potentially dated statements from 1990; why no {{VTE}}?
More importantly, are there any options for displaying separate counts using this template? When invoked on the categories for potentially dated statements, it will show the categories by month (going from January 2005 to February 2021) à la Category:Articles containing potentially dated statements from January 2020, but it won't show the categories by year, which means it skips out on Category:Articles containing potentially dated statements from 2004 etc (of which there are a lot). I think there ought to be an option to include something like that, but I'm not sure how to do it myself. Any hot tips? jp×g 23:16, 6 February 2021 (UTC)
- It looks like
|from=
can do something customized with the date if the date is not in the usual Month Year format, but I do not see any examples in the documentation or the testcases. – Jonesey95 (talk) 01:53, 7 February 2021 (UTC)
Dark mode fix
[edit]@Izno: Please do these edits below to fix view on dark mode, thx.
- Modify for Module:Progress box/styles.css:
.maint-cat-progress {
border: 1px solid var(--border-color-base,#a2a9b1);
border-spacing: 3px;
background-color: var(--background-color-neutral-subtle,#f8f9fa);
color: var(--color-emphasized,black);
padding: 0.4em;
font-size: 88%;
line-height: 1.5em;
margin: 0.5em 0;
}
- If possible, also fix centered title:
.maint-cat-progress-header {
background: #ddf;
padding: 0.2em;
font-size: 125%;
font-weight: bold;
text-align: center;
}
- Modify for Module:Progress box:
-- Header row
root:tag('div')
:addClass('maint-cat-progress-header')
:addClass('skin-nightmode-reset-color')
:wikitext(self._header)
Dabao qian (talk) 17:03, 6 September 2024 (UTC)
- I've added support for dark mode. The title line was aligned left when I got here and based on a cursory view of the HTML it's always been that way, and I don't feel an urge to change it. You can file an edit request if you really want. Izno (talk) 17:20, 6 September 2024 (UTC)
- L-93:
::@media screen and (prefers-color-scheme) {
? Dabao qian (talk) 17:24, 6 September 2024 (UTC)
- L-93: