This is an archive of past discussions about Template:Archive. 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.
Not done (WP:BRD - assume we are at step 3 now). @JsfasdF252: this will need a lot more discussion, several initial issues: it will categorize 200,000+ pages; the categories created will be redlinks (e.g. Category:Mediawiki_talk_page_archives); that may not be the best naming convention for the categories. I suggest you start a discussion to gain consensus that this project-specific categorization is useful first. — xaosfluxTalk16:01, 8 January 2021 (UTC)
Template-protected edit request on 5 September 2020
This edit request to Template:Archive has been answered. Set the |answered= parameter to no to reactivate your request.
It would be good to be able to go directly to the article page from an archived talk page. I suggest adding the link to the article next to the link to the main talk page, on the top left, just below "From Wikipedia, the free encyclopedia". See for example Talk:Black_hole/Archive_14. We could change it from:
Why is it important to have this functionality in the web interface itself. Wouldn't it be sufficient if the {{talkarchive}} (or {{Talkarchivenav}} etc) header template contained that link? (I mean, it's a job we can do ourselves, right?) Would save us having to involve the devs... CapnZapp (talk) 09:47, 28 September 2020 (UTC)
Link to page discussed
I came here to ask the same thing:
To reduce the number of clicks needed to return to the page under discussion, can we add a link to change:
This page is an archive of past discussions.
to something like:
This page is an archive of past discussions about Example.
You're not wrong. The name that will be used is Archive, but the code is that of aan since that one already has navigation. Hence any edits made to this page will soon not be in use. --Trialpears (talk) 20:52, 26 December 2023 (UTC)
Thanks for the ping :) I've manually updated all my archive pages, so I should be in the clear now. While I was at it, I went in and updated SirFozzie as well. He's not going to mind! - Alisontalk03:16, 22 July 2024 (UTC)
If you go to an archived notice board discussion with {{Archive}}, like this one. The template's link text changes from "current talk page" to "current main page", and it switches from calling the yellow {{Tmbox}} to the grey {{Mbox}}. It is using {{Namespace detect}} to make both switches. Can this template do the same? (I'm posting in this thread because it is a similar issue and in case anyone is subscribed) @Andrybak and Hilst: pinging you guys for expertise. Rjjiii (talk) 12:42, 23 July 2024 (UTC)
Thanks, Hilst! I've pushed this live. On actual archives it looks fine: Talk:Afghanistan/Archive_6, and it now renders grey like {{Archive}} does in mainspace. At the top of Template:Automatic archive navigator it uses the grey {{tmbox}} (which makes sense as it's not a talk page). Is there a way to get the yellow rendering in the template's example like on Template:Archive? I think this would more clearly signal to editors that they're in the right place. I hope I'm not putting too much on your plate; there's just a good bit here that's over my head. Rjjiii (talk) 00:32, 24 July 2024 (UTC)
Done! The implementation is not as neat as the one in {{Archive}} since we don't have <noinclude> on modules, but it should work. Please remember to remove "/sandbox" from line 135 when pushing it to the live version. – Hilst (talk | contribs) 13:12, 24 July 2024 (UTC)
Thanks for the ping, Hilst. I've pushed the changes live. If no more problems pop up, then yes I think it's ready to merge. Rjjiii (talk) 21:28, 25 July 2024 (UTC)
@Hilst: I copied the live version of this template to Template:Archive/sandbox and copied the testcases over to Template:Archive/testcases. I started to look into issues, but realized it would be more productive to just reach out. I copied the module over to Module:Archive, and invoked it from {{Archive/sandbox}}. The banner always renders as {{aan}} would render, on its own, as if the module isn't seeing any parameters. If I copy the text from the sandbox and just invoke it inline, it works fine. The two examples below both have the same |prev= and |next= parameters from the testcases page:
@Rjjiii: It's been fixed! Line 352 was the one causing the problem, since it was trying to get the parameters from Aan. PS: The examples above are making it so I can't add a new section or reply to you quickly, can you remove them? – Hilst (talk | contribs) 19:54, 26 July 2024 (UTC)
@Hilst: I've commented them out, sorry about that. I should have been more patient; I changed that line just before posting, but maybe didn't wait long enough for the change to take effect. The box is still grey for me at the template page Template:Archive/sandbox, but this is likely the same issue where I'll just have to wait a minute.
I'm going to start merging the templates' documentation next. On that note, is a |1= parameter meant to do something for this template? The docs say it suppresses a message, but using it seems to have no effect. And I don't know why it would be desirable to hide the message? {{Archive}} uses it to define a custom link for the main page, but I'm struggling to find a page that uses that in a useful way.
It's still grey because the line is pointing to the main template, not the sandbox.
The message only gets suppressed if the first parameter is 1, i.e. {{Automatic archive navigator|1}}. It's a leftover from an old template that was previously merged into this one. It can probably be changed to how the parameter works on {{Archive}}, but I'd rather keep it how it works right now, for compatibility reasons. (Also, how many peopl realistically click that link?
Yeah, that's what I had in mind too. On a different note, Module:Archive should probably be deleted in favor of Module:Automatic archive navigator being moved to that title, since I'd like to keep its revision history intact.
"1=1" suppresses the message sounds good. I'll try to make it more clear in the /doc page. A parameter to change the link target really doesn't make much sense.
Once the testing module is deleted, I'll move the proper module over to Module:Archive and make the same name changes. I'll have to go ahead and convert this template into a redirect so that it continues to work as intended. Thanks again, Hilst, Rjjiii (talk) 21:44, 26 July 2024 (UTC)
@Hilst: I'm looking over the doc page to do the merged one. There's a bit that seems wrong. It says "| style (minor warning) / notice (messages)" give the same effect as on {{tmbox}}. "|type=notice", "|style=notice", "|notice", and "|1=notice" all seem to do nothing in this template. Should this be removed or is the meaning unclear? Rjjiii (talk) 00:31, 27 July 2024 (UTC)
"style" and "notice" in this case mean the special types listed at Template:Tmbox § Talk page message box types. It's supposed to be passed to {{Automatic archive navigator}} through |type=, but it seems like that functionality was not coded in (or only existed in a previous version). I've added it to the sandbox, so writing something like {{Aan|type=speedy}} will now give you a *very* menacing header. (Though I'm not sure if we should allow people to do that.) – Hilst (talk | contribs) 00:50, 27 July 2024 (UTC)
I checked archive.org, and the parameter has done nothing for years.[3] I think your sandbox version is what the doc intended, but I can't see how that's valuable. Especially when the free-form style parameters already allow changing the colors. I'm merging the two template nows and will archive this talk page soon. Rjjiii (talk) 01:07, 27 July 2024 (UTC)
Oh, shoot, sorry about that. I appreciate the work you put in and your patience with my questions. (I moved that talk page over to Template talk:Archive/Archive 2 here since it contains discussions about the current code base of the template.) Rjjiii (talk) 01:21, 27 July 2024 (UTC)
Template-protected edit request on 28 July 2024
This edit request to Module:Archive has been answered. Set the |answered= parameter to no to reactivate your request.
Yes, but I will have to be pinged about it later, because I am too tired at the moment to commit to some big-ass thing where I have to sit around for half an hour and make sure I do not break everything. jp×g🗯️21:40, 28 July 2024 (UTC)
@Hilst: I've done the above and also moved over the /doc and /sandbox pages. There are two sets of testcases pages that I haven't moved over yet.[6] None of these are template-protected, but if you don't feel comfortable moving them, I can move these also. @JPxG: I did the changes requested above. Because moving a module leaves a redirect behind, Module:Automatic archive navigator editsection will continue to function as it did before; you can update whenever you wish. I had reached out because I've been avoiding messing with any of the custom userspace headers while merging these templates; some are pretty complex and specific-to-the-person. Rjjiii (talk) 20:18, 29 July 2024 (UTC)
Note that for some reason the CSD category talk archive has two duplicate transclusions of the template (the second one at #Odd bug) so removing both of them makes the page away from the category. ObserveOwl (talk) 17:31, 9 October 2024 (UTC)
@Hilst: Only in main space, this adds an extra colon that breaks the link. See Talk:Antisemitism/Archive 20, where it says "This is an archive of past discussions about [[::Antisemitism]]." I checked the other namespaces and it seems to work in those, Rjjiii (talk) 18:58, 9 October 2024 (UTC)
Yes, thanks! And also sorry about doing two updates back to back on a widly used template. I noticed the live template was linked to the sandbox and needed to go ahead and fix that. And also, thanks for leaving the clear message above with links and examples, ObserveOwl, Rjjiii (talk) 19:28, 9 October 2024 (UTC)
@Rjjiii: I noticed some of these abnormalities as well, and had actually started manually editing some transclusions to conform with what seemingly needs to be done here. And ... you may the best editor to ask this, given I saw your work on Module:Archive and since I'm not very versed in editing modules/Lua: In Template:Archive, did 1=1 function like it does prior to you performing your edits? (After reviewing the edit history of Template:Archive/doc, it looks like it did not, but feel free to correct me if I'm wrong there.) If not, is it possible for that to instead of hiding just the text in the article box to hide the entire archive box, leaving just the navigational links below it? Steel1943 (talk) 16:19, 2 October 2024 (UTC)
Responding here so that the discussion will be easier to locate for future editors. I'm not so great with Lua either tbh; if you look at the sandbox histories, you'll see that I've mostly been discussing, testing, and cleaning up talk pages.
The sandbox now has |omit=banner to omit the whole box. There is almost certainly a better way to code that if you flag down someone better with lua modules. It worked okay when I previewed {{archive/sandbox|omit=banner}} on a few of the odd pages. |next= and |previous= are already available, but for some pages like Wikipedia talk:WikiProject Middle-earth/archive10 it probably makes more sense to move the page. Rjjiii (talk) 06:19, 3 October 2024 (UTC)
@Hilst: I only added a parameter because I was unsure how "1=1" was currently being used. In your recent sandbox update (much appreciated!), the sandbox version now omits the banner for "1=1". If that works fine on the pages currently doing it, then "omit=banner" can just be removed entirely. That's closer to what Steel1943 had proposed anyway. Rjjiii (talk) 18:20, 4 October 2024 (UTC)
I've implemented this in the sandbox. I've also removed |1=1, since I don't see any value in keeping a special case that is pretty much unused. – 🌻 Hilst (talk | contribs) 14:43, 10 October 2024 (UTC)
@Rjjiii: Could you review the changes and push them to the live template? It's just a simple rewrite of table code, |omit=links, and some misc improvements (ignore the yellow test cases, the output is the same between both versions, save for the order of some CSS rules). Thanks. – 🌻 Hilst (talk | contribs) 17:51, 13 October 2024 (UTC)
Yes, and if I don't do it in a week or so, {{ping}} me again to remind me. The whole site's default font size is a bit bigger, so the links are slightly too wide on a page like Wikipedia:Neutral point of view/Noticeboard/Archive 101 (try zooming the page in and out with the toolbar pinned, if it looks fine at first), so fixing that is a priority. I'm also waiting a week to see if any more bugs are reported, Rjjiii (talk) 19:10, 13 October 2024 (UTC)
By too wide, do you mean that they spill out into the sidebar? If so, a simple max-width: 100% should prevent that. I don't use Vector 2022, so I didn't know that that was an issue. – 🌻 Hilst (talk | contribs) 19:31, 13 October 2024 (UTC)
User talk:Paper9oll/Archive 8 This is another archive using a custom userspace template. I tested the sandbox template out here and it breaks in a different way. I don't know if it's worth making any kind of change to the template to accommodate pages like this though. Courtesy ping to Steel1943 who was looking into these, Rjjiii (talk) 00:16, 14 October 2024 (UTC)
Down to 100 transclusions now. For some of the odder uses of archive nav, I think it's easier for us to just remove the template entirely. – 🌻 Hilst (talk | contribs) 12:12, 27 October 2024 (UTC)
@Rjjiii: We're down to only Fish and karate's archives. I've left a message over at his talk page, but if you want to speed things up, feel free to ask someone at AN to do so. – 🌻 Hilst (talk | contribs) 13:15, 27 October 2024 (UTC)
Possibilities for merging uncommon templates into this one?
There are several templates that make archive banners, that I am thinking could possibly be merged into this one. {{UserTalkArchive}} seems redundant but I may be overlooking something. Check out the sandbox for a proof of concept on on using {{archive|period=index}} to replace {{Archive index}} and {{Archive-index}}.
I am not sure how difficult it would be to implement something like |period=annual for pages using the format "Archive 2023, Archive 2024, etc.". I also wonder if there might be a way to detect situations where the year-based links of {{Annual archive}} would be appropriate ("Archive 1" does not exist but an page beginning with "Archive 20..." does?). Rjjiii (talk) 02:36, 29 October 2024 (UTC)
{{UserTalkArchive}} has a slightly different blurb ("past discussions with X" vs "past discussions about X") and the box listing all archives. Other than that, it has the same functionality as {{Archive}}.
I'm not sure if |period= is the correct parameter for implementing {{Archive index}}. Maybe it should get its own parameter?
Annual archives shouldn't be too hard to implement. We could just reproduce {{Yearly archive list}}'s logic (or, better yet, use the actual template with expandTemplate).
The blurb there makes slightly more sense, but it's not a huge difference. If the blurb here could be switched automatically on namespaces 2 & 3, it would make more sense, but again not a big deal. The box is an actual difference, but I don't know that it's a positive difference to have an arbitrarily different interface on a handful of talk pages.
I'm not attached to "period=index" and would be fine with an |index= parameter.
expandTemplate is definitely the way to go. That should give the same output as the main talkpage banner for annual archives.
@Hilst In the sandbox, I've added "index" as a possible value for a |type= parameter. I've also added a preposition that will change depending on namespace. This should make the blurb brought up by Andy more clear for user talk pages and noticeboards. I started to add "annual" as another |type= and to try out expandTemplate, but there is too much there that I don't grasp, Rjjiii (talk) 20:23, 11 November 2024 (UTC)
Thanks for looking into it. I started to do a proof of concept to see whether {{yearly archive list}} would make more sense inside the box where {{annual archive}} has it (which is probably the right place as it is), or below the box since the numbered links would need to be suppressed anyway for annual archives. I ran into the issue that about 50 or so pages do the annual archives with a complicated subpage format (User talk:User/Archives/20YY) which may not be worth it to add everything to support that for those 50 pages, :-/ Sorry if I've led you on a goose chase there. I will still likely push changes live for the namespace prepositions and index blurb, Rjjiii (talk) 07:46, 20 November 2024 (UTC)
I think all the parameters work for an annual archive now, but am somewhat hesitant to add a bunch of parameters. The more I think about this, the more it seems like the correct thing to is to check the format ("Archive 20XX", "Archive/20XX", or "Archives/20XX"), check to make sure "Archive 1000" doesn't exist, and then intuit that the archive is annual. I'll probably leave this in the sandbox and push some other changes live this coming week. Rjjiii (talk) 17:34, 23 November 2024 (UTC)
@Hilst & DMacks, I would not describe this as broken, but try to preview the sandbox template ({{archive/sandbox}}) on this page which has annual archives but no navigation links right now: Talk:IEEE 1394/Archive 2004
I'm wondering if this doesn't offer a better way to navigate than the link list that {{annual archive}} offers. Is there an easy way to suppress the red links to years not archived ("Archive 2000 ← Archive 2002" in this case), and would it be preferred to suppress them? Rjjiii (talk) 23:46, 23 November 2024 (UTC)
The Sandbox(1) and Sandbox2 solutions work the same, but Sandbox2 requires an extra parameter. Both show all the archives, and both will create red links for years with no archives. {{Annual archive}} shows only the years with archives, but it is a bit fiddly. Rjjiii (talk) 07:25, 29 November 2024 (UTC)
@DMacks, I've pushed the change live, thanks for following up on the bug. @Hilst Thanks again and feel free to reach out in the future. I'm going to hold off on trying to merge the annual archive template, Rjjiii (talk) 02:34, 12 December 2024 (UTC)
You can use the |text= parameter for a hand-written message.[12] I don't know if there's a clever solution to the many different usages of subpages. Before Andy Mabbet's suggestion,[13] the archive banner templates just didn't give a link. Rjjiii (talk) 02:44, 12 December 2024 (UTC)
@Hawkeye7: The current version of the sandbox should be linking to correct pages now. The logic that is handling this is quite hacky, but it works. If anyone is able to clean it up then go ahead. Otherwise, ping me if any problems appear. – 🌻 Hilst (talk | contribs) 15:54, 25 December 2024 (UTC)
I checked on a couple dozen archives in different namespaces and with the weirdest names I could find. I don't see any outright errors.
Small bug: For pages with the title structure of "Talk:Main/subpage/no/no/Archive", like Help:Books/Feedback/Archives/2009/December, the link will point to the main page and not the subpage.
In the sandbox, I've recently done some tinkering. This should automatically handle the various formats covered by {{annual archive}} without having to use the prefix and whatnot parameters. It could be made to render the same as that template also if that was the preferred style. Rjjiii (talk) 04:26, 28 March 2025 (UTC)
This creates an Archives search box in the upper right corner of my user talk page. I strongly believe that this affected my user talk archive pages as well. At the top, they all begin
{{Talk archive}}
Maybe I'm wrong, but I though that this used to automatically display the contents of User talk:Anomalocaris/archivelist. But now, the first archive page, with a less-standard name, has no horizontal list of wikilinked archive pages, and the rest of the archive pages, with year-numbered names, have a horizontal list of wikilinked archive pages, omitting the non-standard 2006–2013. Am I right that a capability was removed, and if so, is there still a way to get the behavior I used to get, and if it was removed and there is no current markup that works, please restore the old system that did work. —Anomalocaris (talk) 00:57, 12 May 2025 (UTC)
@Anomalocaris Older versions of the template would have made no navigational links on those archived talk pages. The template initially did not make navigational links, and then only made them for sequential archives. The recent change was to add navigational links on archives that end with a plausible year.
To get the old behavior back, you can add |omit=archives to suppress the navigational links. If you want to transclude that userspace list of archives, you could use {{archive|omit=archives}}{{center|{{User talk:Anomalocaris/archivelist}}}} either on an archive page, or on a separate userpsace page to be transcluded.