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'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.
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. RichFarmbrough,
23:28, 17 May 2011 (UTC).reply
Some boxes getting too long
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)reply
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)reply
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)reply
I have (to a large extent) implemented safesubst in the template, it is not guaranteed to be without problems but seems to work. RichFarmbrough,
18:28, 29 June 2011 (UTC).reply
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)reply
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. RichFarmbrough,
23:49, 13 October 2012 (UTC).reply
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)reply
@
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:ORPHANGEcontributor 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)reply
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)reply
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)reply
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)reply
(
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)reply
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)reply
Mr. Stradivarius, I have no idea what access to the API that Lua has, but...
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)reply
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)reply
sorting
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)reply
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)reply
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)reply
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)reply
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)reply
"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)reply
Lua version
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)reply
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)reply
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)reply
Lua version not including subcategories
Seems to fail when there are very old cats? sometimes.
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)reply
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)reply
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.
@
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)reply
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 away is tractable in code.
PAGESINCATEGORY is one greater than the count: why?
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)reply
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)reply
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: RichFarmbrough,
03:17, 10 February 2016 (UTC).reply
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)reply
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'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.
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. RichFarmbrough,
23:28, 17 May 2011 (UTC).reply
Some boxes getting too long
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)reply
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)reply
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)reply
I have (to a large extent) implemented safesubst in the template, it is not guaranteed to be without problems but seems to work. RichFarmbrough,
18:28, 29 June 2011 (UTC).reply
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)reply
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. RichFarmbrough,
23:49, 13 October 2012 (UTC).reply
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)reply
@
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:ORPHANGEcontributor 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)reply
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)reply
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)reply
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)reply
(
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)reply
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)reply
Mr. Stradivarius, I have no idea what access to the API that Lua has, but...
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)reply
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)reply
sorting
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)reply
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)reply
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)reply
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)reply
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)reply
"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)reply
Lua version
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)reply
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)reply
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)reply
Lua version not including subcategories
Seems to fail when there are very old cats? sometimes.
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)reply
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)reply
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.
@
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)reply
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 away is tractable in code.
PAGESINCATEGORY is one greater than the count: why?
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)reply
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)reply
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: RichFarmbrough,
03:17, 10 February 2016 (UTC).reply
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)reply