Template talk:Monthly archive list

Hitting the Expensive parser function count per page limit (500)
This template, in its default usage MonthlyArchive, currently consumes 459 expensive parser functions (EPF). When 2014 is added that number will be 493 EPFs. There is a maximum limit of 500 EPFs per page. When 2014 is added, on 5 of the pages which currently use this template users will not be permitted to save new version of the page due to exceeding the maximum of 500 EPFs. The quick and easy way to extend the life of this template, in its current form, is to reduce the number of years for which it checks for files. After surveying all of the pages which transclude this template, I determined that none of them use it such that files prior to 2003 are found. Thus, I am proposing removing 2001 and 2002 from the template.

Clearly, a longer tern solution needs to be found. Right now, let's keep this working for those pages that use it into 2014. Makyen (talk) 07:09, 22 December 2013 (UTC)
 * Before I discuss the current issue, I would like to ask whether you have any ideas regarding that longer-term solution. Dogmaticeclectic (talk) 09:40, 22 December 2013 (UTC)
 * Sorry for the delay in getting back to you. I did not have a good answer for you until recently. When you initially asked about this I did not know of any good way to accomplish keeping the existing functionality while reducing EPFs. After some research and someone else creating the needed functionality in Lua, it appears possible to re-code this in Lua without the need for expending large numbers of EPFs.


 * However, I would recommend that, in the interim, we remove 2001 and 2002 while adding 2014. This will permit the pages currently using this template to continue use it into 2014 without the need to recode it immediately. In fact, assuming that no changes are made to any of the pages using this template that increase their use of EPFs, such change will give until 2016 to re-code. I do intend to do the recoding in Lua, but I would much prefer not have to happen under a time crunch. Particularly, when such a time-crunch is not necessary. Makyen (talk) 21:28, 10 January 2014 (UTC)


 * User:Makyen, I've now removed 2001 and 2002 again and restored 2014. I would appreciate it if you at least provided a rough time estimate as to how soon this coding can be done. Dogmaticeclectic (talk) 22:52, 10 January 2014 (UTC)

Hitting the parser function error again
It looks like the above situation is happening again (see Category:Pages with too many expensive parser function calls), as it probably will every year until a better fix is put in place. I wonder if there should be a default value for monthformat. Or perhaps some clever soul could rewrite this in Lua, which I hear might take care of this problem nicely. – Jonesey95 (talk) 21:41, 1 March 2017 (UTC)
 * It's possible to write an exponential search algorithm in Lua that can reduce the number of expensive function calls from over 500 down to a dozen or so. (I've actually been working on an archive module that provides this functionality at Module:Archive, although it's not ready yet.) However, for an exponential search to work, there cannot be any gaps in the archives. For example, if you have the archive pages,  ,   and  , then if you searched backwards from March 2017 the algorithm would only detect   and  . An exponential search in Lua could help with the usual use case of sequential archives, but it can't help with archives that aren't sequential. For those, I don't know of any other way than testing all possible archive pages for existence. — Mr. Stradivarius  ♪ talk ♪ 23:35, 1 March 2017 (UTC)
 * A quick fix for now would be to increase the default startyear value when no startyear paraemeter is specified, e.g. change each instance of  to   – a longer term solution is still needed, but with monthformat specified we should be able to keep going until around 2040. Maybe startyear and monthformat should be made into required parameters, with a tracking category and error message when they are not used. - Evad37 &#91;talk] 23:59, 1 March 2017 (UTC)
 * I think that the "required parameters" approach is probably best until a better answer comes along. A tracking category would be a good start. – Jonesey95 (talk) 00:18, 2 March 2017 (UTC)
 * Tracking cats Category:MonthlyArchive without startyear and Category:MonthlyArchive without monthformat will now be populated by the template - Evad37 &#91;talk] 09:43, 2 March 2017 (UTC)

Index parameter
I wasn't able to find the parameter used in the archives template. Can you explain what it's for? Jerod Lycett (talk) 01:51, 24 September 2018 (UTC)

Broken
The template doesn’t work with. Not in the sense that devels forgot to apply yearly update for 2019. It links using months’ long names. Incnis Mrsi (talk) 08:29, 31 May 2019 (UTC)
 * Found to result from in MonthlyLinks. Incnis Mrsi (talk) 08:51, 31 May 2019 (UTC)

Making MonthlyArchive better
It's pretty clear from the above threads (and even just from looking at the code behind the template) that this isn't sustainable in the current way it works. Never having looked at this before, when I just had to do the 2020 update for this template because my talk page archiving had broken, I was a bit shocked at the implementation which is used currently. I don't mean that in an insulting way to the people who first made it - on the contrary, they found a way that worked, and worked well, for doing monthly archiving at the time! However, it's going to cap out at some point, as discussed above - and more than that, more than the server resources it takes up, I just don't think it's a good idea to have a template that requires manual updating every year.

So what's the solution? Well, I'd like to propose the following:


 * 1) Template:MonthlyArchive is changed so that, rather than looking for pages itself, it instead pulls pages from a list - say, User talk:Example/ArchiveInfo. That list would contain the links to the relevant archive pages.
 * 2) Current archiving systems, such as User:ClueBot III and User:lowercase sigmabot III, are modified so that, when they archive a new page, they add this page as a link to the relevant User talk:Example/ArchiveInfo page. This page should be shared across bots for interoperability purposes, and should be published in the template documentation. I'll notify the devs of these bots of this thread.
 * 3) Existing archives are automatically converted by a special bot set up to do so. I don't have any wikibot experience, but I am a programmer, so I'm happy to have a crack at this task if this proposal gains consensus - I've looked up the relevant documentation and it looks doable. I'd plan on doing this by finding pages where the template is transcluded, taking the existing links off the template, and copying them to the new User talk:Example/ArchiveInfo page I'm proposing. It might also be worth this bot leaving a note on anyone who uses the MonthlyArchive template but not a supported bot.

I'd love to hear people's thoughts on this. It's more than possible I've missed some obvious reason why this wouldn't work - but to me, this seems a sensible idea.

All the best, and stay safe, Naypta ☺ &#124; ✉ talk page &#124; 12:49, 24 April 2020 (UTC)
 * A bot-based solution does sound like the only workable solution in the long run, and I would support such an effort. I think the biggest question would be whether to make bot-based indexing the default or not. I suspect, at least, that at the start bot-based indexing should be opt-in, perhaps by an extra parameter to the template adding a tracking category. Also, I don't think the code for ClueBot III or lowercase sigmabot III necessarily needs to be updated; there could be a new bot whose specific job is to populate the archive info pages. (I would go for User talk:Example/Archive index, by the way.) Best — Mr. Stradivarius  ♪ talk ♪ 13:23, 11 July 2020 (UTC)
 * Actually, there is another possibility: I remember in the past there was some talk about enabling Lua scripts to access the functionality provided by Special:PrefixIndex. If we had this functionality, then we would effectively be able to bypass the expensive function count, as only existing pages would be returned by such a query. (For example, you can find all the archive pages for Luton by using Special:PrefixIndex/Talk:Luton/Archives/.) The issue would be how to implement this without allowing Lua to request millions of pages at once, slowing down the site. Special:PrefixIndex does this through pagination, but there would have to be a different solution for Lua. — Mr. Stradivarius  ♪ talk ♪ 13:34, 11 July 2020 (UTC)
 * Thanks for the reply I'm not aware of any ability to do it in Lua at the moment, sadly - if there is one, it's not documented in the Scribunto reference manual. What I actually ended up doing myself was writing my own Lua-based archiving template, Monthly archived talk, which rather than trying to find a list of pages that exist and check them, just iterates through the months and displays links for each of them; the non-existent links are then styled by Archives by months. Naypta ☺ &#124; ✉ talk page &#124; 09:19, 12 July 2020 (UTC)

Requested move 3 July 2020

 * The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion. 

The result of the move request was: moved  Mdaniels5757 (talk) 17:03, 18 July 2020 (UTC)

Template:MonthlyArchive → Template:Monthly archive list – Per consistency with Archive list and Yearly archive list. Pages will not have to be updated since a redirect will be left behind, but it will be easier for users to find the template if it conforms with the naming scheme used by other similar templates. --Trialpears (talk) 20:18, 3 July 2020 (UTC) —Relisting. (t &#183; c)  buidhe  00:50, 11 July 2020 (UTC)
 * Support per WP:CONSISTENT title style. --Gonnym (talk) 12:09, 11 July 2020 (UTC)
 * Support. Making the titles consistent sounds like a good idea. — Mr. Stradivarius  ♪ talk ♪ 13:41, 11 July 2020 (UTC)

Automatic bot detection and parameter "root"
Regarding the recent Special:Diff/1222200740, please join the discussion at Template talk:Archives. —⁠andrybak (talk) 15:00, 4 May 2024 (UTC)