Template talk:Archive navigation

Truncating
Is there any way to truncate this template on the last archive, so a redlink to a nonexistant archive doesn't appear? /Blaxthos 21:12, 7 October 2006 (UTC)
 * No, it's an bug in that is that it cant handle sub-pages. → A z  a  Toth 21:15, 7 October 2006 (UTC)

I've never coded for wiki* or anything, so maybe this is a silly suggestion, but how about just adding a boolean 3rd arg, when set to 1 (or present at all) it supresses the redlink'd archive page (Archive+1). /Blaxthos 21:23, 7 October 2006 (UTC)
 * I think having the redlink is useful; it shows people where to put the next archive, it makes sure they call it "Archive 3" rather than "archive 3", "Archive3", "Archive/3" or something like that - because if they did, the link wouldn't work – Gurch 09:23, 12 October 2006 (UTC)

I'm a bit tired at the moment, and can't understand the code I wrote, but I did the above in Log. It might or might not work here if somebody wants to try it! --kingboyk 00:23, 6 March 2007 (UTC)
 * On second thoughts, I think for human edited pages like this is used on, the red link is handy. --kingboyk 19:58, 6 April 2007 (UTC)

Problem?
I recently created User_talk:Carcharoth/Archive_7, which displays the archive pages at the top fine, but the previous page, User_talk:Carcharoth/Archive_6, doesn't have the link to Archive 7. What is going on? Carcharoth 02:18, 11 December 2006 (UTC)


 * I see a link to 07 just after "Archive 06". Looks to be working from here.  /Blaxthos 02:21, 11 December 2006 (UTC)


 * That was weird. I clicked 'edit this page' for the Archive 6 page, entered 'null edit' in the edit summary box, then clicked save. The archive template now works, but the null edit doesn't appear in the history (I didn't change anything). Maybe Null edit? Carcharoth 02:23, 11 December 2006 (UTC)
 * Bingo. It was a template caching/job queue problem. The null edit jumped the template update to the front of the job queue. I think. Carcharoth 02:24, 11 December 2006 (UTC)


 * This is not a bug or defect. null edits are still needed sometime to place a specific page in front of a long job queue, because pages using templates may take some long time to be purged from the cache if the template or links that they use are modified (remember that a template or link reference may need purging many pages from the cache and, depending on the current server load, this may take significant time. Such cache purge is queued becauseit would take too much ressource on the server if all dependencies were updated in real time each time a linked page is added or a dependant template is updated.
 * Null edits are however still needed for pages that include templates inserting categories for the embedding page, if these generated categories are modified (an explicit "purge" action does not alter existing categories immediately, and this make take hours or days for the categories of the embedding page to be updated).
 * When you save a page without editing it, it is normal that nothing appears in the history, because there was no diff to place in the history. However, it has the immediate effect of recomputing the categories for the null-edit saved page... verdy_p 22:54, 2 January 2007 (UTC)

design
I made the change to enable a dynamic list of up to 20 pages, instead of the older static display of three fixed pages. Any problem? → Aza Toth 23:22, 2 January 2007 (UTC)

Category talk
Have I done something wrong, or is this broken on category talk pages? Please see: --kingboyk 19:57, 6 April 2007 (UTC)
 * Category talk:Administrators open to recall/Archive 1
 * Category talk:Administrators open to recall/Archive 2


 * Kingboyk: Thanks for reporting this. So I investigated it:
 * Yes, many of these archive templates are broken when on "Category talk" and "Help talk" pages. The reason is that those namespaces doesn't fully support subpages. Most of us consider that a bug, so we have reported the bug. You can read more about that at Village pump (technical)/Archive 59.
 * But there is no telling when they are going to fix that bug, so I am coding a workaround. See template pgn that I will plug into these archive boxes.
 * --David Göthberg (talk) 22:31, 22 April 2009 (UTC)

Added feature
As some old archives were named incorrectly (e.g. "archive2" instead of "Archive 2"), I have added the possibility to use custom pagenames with optional "prev" and "next" fields. I suppose no bugs should result from this. Súrendil 18:26, 7 September 2007 (UTC)


 * Could we also have an endarchive? My archive seen here has a redlink at the end. :| TelCo  NaSp   Ve :|   02:21, 7 July 2010 (UTC)
 * I could make it so that it only displays if the page actually exists. But would this be desirable in every case? &mdash; Martin (MSGJ · talk) 21:20, 8 July 2010 (UTC)
 * Possibly. Let's see if it is... :| TelCo  NaSp   Ve :|   21:37, 8 July 2010 (UTC)
 * How's this? &mdash; Martin (MSGJ · talk) 21:54, 8 July 2010 (UTC)
 * Perfect! Thanks so much! :| TelCo  NaSp   Ve :|   21:58, 8 July 2010 (UTC)
 * Okay, ✅. Let's see if anyone objects to this. &mdash; Martin (MSGJ · talk) 22:16, 8 July 2010 (UTC)

Hmmm... one of my previous archives appears to have changed during this new process. It doesn't seem that inconvenient but I'm requesting a change to the archive template anyway, if anybody has the time to do it. :| TelCo NaSp   Ve :|   13:57, 13 July 2010 (UTC)

Documentation
editprotected

Can an admin move the documentation information to a seperate /doc page by adding documentation? Thanks!  Math Cool  10  Sign here! 02:29, 14 April 2009 (UTC)
 * ✅. All categories, interwikis, and documentation moved to transcluded /doc subpage. –Drilnoth (T • C • L) 02:40, 14 April 2009 (UTC)

Problem
Not sure what has happened here, but this template has not formatted correctly on my first archive page, it is fine on all the rest. Link User_talk:Mollsmolyneux/Archive_1. What have I done wrong? Thanks for any help --Mollsmolyneux (talk) 19:13, 11 July 2010 (UTC)
 * The same thing happened to my page, but mine was on a subpage, User:Battleaxe9872/Archive 1. Battleaxe9872  Talk 14:40, 2 August 2010 (UTC)
 * See the two sections directly above this one. I had the same problem. :| TelCo  NaSp   Ve :|   21:11, 4 August 2010 (UTC)

Merging
We had a consensus to merge this template with Archive nav back in October, but no consensus on how to implement it. I think the best path forward is to do like SMcCandlish said: "integrate the best functionality of both [template]". I will list the features of both templates and hope we can come to some sort of consensus.

Features of Archive navigation:
 * Links to previous and next archive
 * Supports hiding redlinks, shows them by default
 * Possible to specify previous and next links

Features of Archive nav:
 * Many different links for simple navigation when there are a lot of archives
 * Redlinks are always hidden
 * Doesn't support specifying links, but can change path (/Archive X being the default)

In my opinion having many links is significantly more versatile, imagine for example you're looking for a November 2019 discussion at WT:MILHIST. You guess that could be something like archive 150, but realize that's too early. With the current archive navigation you would either have to go back to the archive box on the main talkpage, write in the URL field or painfully slowly work your way forward in time. With archive nav you can with one click try archive 155 see that you overshot and with just one more click end up at archive 153 which you were looking for.

I can see if you think Archive nav have a bit excessive amount of links, but a few more would definitely be beneficial.

Hiding of links I've realized is a surprisingly contentious topic, but I think there at least should be an option which way it should be only affecting the next archive which is the only link I've seen people argue is beneficial. I would suggest to use noredlink like is done in Aan.

I think both changing the default path and manually specifying links should be supported. Both have usecases and are beneficial. With multiple links I guess prev (with alias prev1) would be the archive immediately before, prev2 the one before that and so on. Prev2 and next2 would probably only be used very rarely, but it would probably be occasionally useful.

What do you think? Feedback appreciated! Pinging participants in the TfD:. --Trialpears (talk) 15:12, 26 March 2021 (UTC) — SMcCandlish ☏ ¢ 😼  01:01, 27 March 2021 (UTC)
 * Link to TfD for reference: Templates for discussion/Log/2020 October 17. Copying my comment from the time: Regarding how, I like the way Archive nav uses the word "archive" only on the current one; it's not needed for more than that. I also like how it displays more than just the very next or very previous archive. For pages with dozens of archives, we probably don't want to list all, but for ones with only 10 or so, sure, let's have all. I prefer Archive navigation's vertical separators rather than Archive nav's horizontal ones. I realize that doesn't address all the current outstanding questions; I'll trust others to handle those. &#123;{u&#124; Sdkb  }&#125;  talk 17:15, 26 March 2021 (UTC)
 * I think I agree with all of that, Trialpears. I also agree with all of Sdkb's comments except supporting   separators, which is inconsistent with navboxes and inline lists in other navigational elements and in  and . I think Sdkb's underlying probable objection to   separators is their width, and I would agree that it's unnecessary. We should just use mid-dot bullets like everything else does. (I have no objection to a separator parameter, though; we could even add that to  and ). I would propose a merged template that does the following:
 * Rich navigational links, including previous and next archive at minimum; add optional parameter to constrain it to just those two.
 * Non-excessive rich linking: Don't show unless the list is short (10 entries?) Otherwise use staggering like every 5 or every 10, depending on number of pages to deal with. But always show previous and next [unless next is red and redlink suppression is on].
 * Support hiding redlinks, but show them by default; add support for noredlink (from ) for this purpose, if not already a supported parameter name.
 * Non-stupid redlink behavior: If "Next" is a red link, do not show even more red links after that (if the richer navigation is on), unless one or more of them actually resolve to extant pages.
 * Possible to specify previous and next links, and to change "root" path of the archives (with /Archive X being the default pattern)
 * Don't waste space using the word "Archive" over and over again.
 * Use or  to do the layout, or at least use bullets consistent with them as the default separator.
 * The main reason to not suppress a red "Next" link is that the red link makes it easy to create that page when you're doing archival (some of us only clean up our user talk page once a year, and some article talk goes much longer before archival, so this feature comes in very handy for "archival sprees"). The main reason to ever suppress that link is when the page is "retired" (e.g., or a time-limited thing like annual ArbCom elections) and we thus don't expect there to ever be another archive page in the series. Obviously, the former case – of more discussion over time being likely and thus eventually needing archival – is more common by orders of magnitude, so it makes sense as the default behavior. Having more rather than less navigation is more helpful, so that should also be the default, as long as there is actually stuff to navigate. PS: We should also see about merging in other features of  so that template, too, can be merged away. It's confusing to have so many extremely similar templates for the same thing, which which all do inconsistent things with inconsistent parameter names. Just make all parameters for the same stuff be aliases of each other across every template of this sort, which makes eventual merger easy. Even if we keep some old template names as wrappers that pre-specify certain parameters, we should have a single codebase for this stuff.
 * Comments:
 * More than one link on either side.
 * Always hiding redlinks I can give or take. I don't really think we need to preserve the choice however. I don't think there are enough people who do manual archival to need it. (There are both semi and totally automated tools to archive content, even mass content - see Sigma's.)
 * Specifying the default archives I think we probably need. I am not totally certain we need to be able to specify specific next/prev archives.
 * I am not a fan of the vertical separators, since it was brought up per consistency (in our stuff anyway). (On that note by SMC, there are some other lists that have access to other separators e.g. cslist.)
 * I agree that the other archive navigation should be merged with these two. I think we should work on the pair that have been through the TFD process first though.
 * -- Izno (talk) 16:45, 28 March 2021 (UTC)

I've made a version at Template:Archive navigation/sandbox (testcases). It's based on Archive nav with the following changes: I've checked other templates for aliases that should be added and only found root as an alias for base which haven't been mentioned before. Are there more things we want here or is this version satisfactory and we are ready to implement it? --Trialpears (talk) 21:10, 31 March 2021 (UTC)
 * Uses the same html as hlist with dot separators. Using the actual template would be a pain since there are variable number of elements.
 * Somewhat fewer links, now it displays the current archive ±5 and all the multiples of 10 within 100 from the current archive.
 * Add support for next and prev for backwards compatibility with Archive navigation and weird quirks with names. next2, prev3 and so on are not supported.
 * Redlinks behave in what I believe would be the way satisfying the most people which is showing the next link even if it's red allowing for easier manual archiving but not showing any other red links. The redlink can also be disabled using noredlink or noredlinks. showmissing from Archive navigation is not supported since it is only used on 26 pages and it will be confusing to have inverse parameters.


 * Seems reasonable. Izno (talk) 14:26, 16 April 2021 (UTC)

I've now implemented the merger with the version I suggested above. I will of course help implement improvements or changes in the future as well if there are any concerns. --Trialpears (talk) 22:04, 18 April 2021 (UTC)

Potential problem with the merge
I am not sure how the template should intend to look like since the documentation has not been updated, but the transclusion on Wikipedia talk:Requested templates/Archive 1 looks wrong to me:

1 · 2 · Archive 5 · 6

Is this intended or not? ~ Aseleste  (t, e &#124; c, l) 14:09, 24 April 2021 (UTC)


 * No... no it is not. Izno (talk) 15:38, 24 April 2021 (UTC)
 * While that isn't intended it isn't exactly the mergers fault either. It was broken before as well. Both the old and the new template is supposed to take a parameter specifying the archive number which wasn't provided here. The default then is 5 for backwards compatibility with Archive nav. Only archives one and two exist so 3 and 4 are red links and this hidden. 6 is shown to make it easy to create the next archive when used properly. Will fix all similar cases I can find tonight. --Trialpears (talk) 17:23, 24 April 2021 (UTC)
 * All related errors should be fixed except for those that would be time consuming to fix and was present before the merger in User talk space and historical pages. --Trialpears (talk) 21:27, 24 April 2021 (UTC)
 * User talk:Godsy/Archive/2021 shows an example of the template not working, if and in your statement is taken to be inclusive. I find this change unacceptable if these errors cannot be remedied (and thereby oppose the merge retroactively). — Godsy (TALK CONT ) 07:47, 26 May 2021 (UTC)
 * I've fixed the issue. I really shouldn't have missed such an obvious thing. The old prev/next implementation has some weird quirks (If you say created User talk:Godsy/Archive everything would break) and would definitely not be how I would design it but now it supports that as well. --Trialpears (talk) 08:23, 26 May 2021 (UTC)
 * Thanks -- The template now functions properly (it looks slightly different than before, but that is something I can deal with). — Godsy (TALK CONT ) 17:32, 26 May 2021 (UTC)

Redlink to Archive 2
I noticed that many pages transcluding this template (listed at Special:WhatLinksHere/Archive 2) incorrectly show a redlink to the mainspace page Archive 2 instead of the actual Archive 2 subpage. This happens whenever the markup  appears on the page. The template needs to be fixed so that the pages using that markup correctly link to the Archive 2 subpage instead of showing a redlink to Archive 2. GeoffreyT2000 (talk) 00:18, 30 August 2021 (UTC)

Proposal: merge "Archive" and "Automatic archive navigator" without deleting this template
There are now only 41 pages left with both archive and archive navigation. I have not converted them because they're protected, but the conversion will be straightforward on all of them. The archive navigation template has an additional 750 transclusions.

I don't think that archive navigation should be deleted. Once the remaining 41 pages are converted from archive+archive navigation to aan, then archive can be merged without issues.

The 750 other transclusions include a lot of archives, especially in userspace, that have atypical names or formats. There's no benefit to removing archive navigation from these pages, and I don't think there is much benefit in trying to move or reformat the types of situations below:


 * Log archives with no talkpage templates
 * Example: User:CbmBOT/Log/Archive 3


 * Date in archive title
 * Example: User talk:Andy Dingley/Archive 2008 December


 * Currency in archive title
 * User:TeleComNasSprVen/The Piggy Bank/9¢


 * Transcluded via usespace template
 * Example: User:TheDoctorWho/PageTabs


 * Within a custom header in user space
 * Example: User talk:RichardF/Archive/Archive 11

Feedback welcome, Rjjiii  (talk) 22:13, 6 July 2024 (UTC)