Template talk:Archive navigation

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Truncating[edit]

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)[reply]

No, it's an bug in {{#ifexist}} that is that it cant handle sub-pages. AzaToth 21:15, 7 October 2006 (UTC)[reply]

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)[reply]

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)[reply]

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)[reply]

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)[reply]

Problem?[edit]

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)[reply]

I see a link to 07 just after "Archive 06". Looks to be working from here. /Blaxthos 02:21, 11 December 2006 (UTC)[reply]
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 Wikipedia:Null edit? Carcharoth 02:23, 11 December 2006 (UTC)[reply]
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)[reply]
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)[reply]

design[edit]

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? AzaToth 23:22, 2 January 2007 (UTC)[reply]

Category talk[edit]

Have I done something wrong, or is this broken on category talk pages? Please see:

--kingboyk 19:57, 6 April 2007 (UTC)[reply]

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 Wikipedia:Village pump (technical)/Archive 59#Subpage feature.
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)[reply]

Added feature[edit]

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)[reply]

{{editprotected}}

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

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. :| TelCoNaSpVe :| 13:57, 13 July 2010 (UTC)[reply]

Documentation[edit]

{{editprotected}}

Can an admin move the documentation information to a seperate /doc page by adding {{documentation}}? Thanks! MathCool10 Sign here! 02:29, 14 April 2009 (UTC)[reply]

 Done. All categories, interwikis, and documentation moved to transcluded /doc subpage. –Drilnoth (TCL) 02:40, 14 April 2009 (UTC)[reply]

Problem[edit]

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)[reply]

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)[reply]
See the two sections directly above this one. I had the same problem. :| TelCoNaSpVe :| 21:11, 4 August 2010 (UTC)[reply]

Merging[edit]

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: @Pigsonthewing, Izno, Gonnym, Tom (LT), Sdkb, and SMcCandlish:. --Trialpears (talk) 15:12, 26 March 2021 (UTC)[reply]

Link to TfD for reference: Wikipedia:Templates for discussion/Log/2020 October 17#Template:Archive nav. 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. {{u|Sdkb}}talk 17:15, 26 March 2021 (UTC)[reply]
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 {{hlist}} and {{flatlist}}. 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 {{hlist}} and {{flatlist}}). 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 all 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 {{aan}}) 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 {{hlist}} or {{flatlist}} 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. {{Historical}}, 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 {{aan}} ({{Automatic archive navigator}}) 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.
 — SMcCandlish ¢ 😼  01:01, 27 March 2021 (UTC)[reply]

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)[reply]

I've made a version at Template:Archive navigation/sandbox (testcases). It's based on {{Archive nav}} with the following changes:

  • 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.

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)[reply]

Seems reasonable. Izno (talk) 14:26, 16 April 2021 (UTC)[reply]

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)[reply]

Potential problem with the merge[edit]

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:

Is this intended or not? ~ Aseleste (t, e | c, l) 14:09, 24 April 2021 (UTC)[reply]

No... no it is not. Izno (talk) 15:38, 24 April 2021 (UTC)[reply]
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)[reply]
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)[reply]
@Trialpears: 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 (TALKCONT) 07:47, 26 May 2021 (UTC)[reply]
Godsy 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)[reply]
Thanks -- The template now functions properly (it looks slightly different than before, but that is something I can deal with). — Godsy (TALKCONT) 17:32, 26 May 2021 (UTC)[reply]

Redlink to Archive 2[edit]

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 {{archive-nav|1|next=Archive 2}} 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)[reply]