Jump to content

Template talk:Archive

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Module talk:Archive/config)

Later archives not linked, take n+1

[edit]

Template talk:Automatic archive navigator/Archive 1#Bug: Missing links to next archives, regarding for example Wikipedia talk:WikiProject Chemicals/Archive 2015 not linking to 2016 and beyond, is still broken. DMacks (talk) 17:31, 23 November 2024 (UTC)[reply]

@DMacks Did the solution that you and Mr. Stradivarius tried back then ever work for annual archives? The issue noted about Wikipedia talk:Manual of Style/Dates and numbers/Archive 145 seems fixed. When I preview Wikipedia talk:WikiProject Chemicals/Archive 2015 using this version of the module, I still don't see an "Archive 2016" link, instead the final link is an "Archive 2" red link. This even older version by Toohool from before the rewrite does correctly give the 2016 link. Also, is the desired output for annually archived page a row of navigation links like this template emits for sequential archives, or is it something more like the list that {{annual archive}} has in its banner? Rjjiii (talk) 18:39, 23 November 2024 (UTC)[reply]
Fixed with this edit. I haven't checked to see if this broke anything else. – 🌻 Hilst (talk | contribs) 19:58, 23 November 2024 (UTC)[reply]
@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)[reply]
@Hilst: That fix appears to work for me (alternately, the [https://en.wikipedia.org/w/index.php?title=Module:Archive/sandbox2&diff=prev&oldid=920507958 one I proposed back then does still applies cleanly to the current module and also still works). DMacks (talk) 12:12, 24 November 2024 (UTC)[reply]
A demo with fake archives on my alt account:
User talk:Rjjiii (ii)/Archive 2005
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)[reply]
@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)[reply]

Incorrect for talk pages

[edit]

I tried adding this template to Wikipedia talk:WikiProject Military history/Requests for project input/Archive 1 but it generated incorrectly.

It says:

This is an archive of past discussions on Wikipedia:WikiProject Military history. 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.

What is should say is:

This is an archive of past discussions on Wikipedia talk:WikiProject Military history/Requests for project input. 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.

This template cannot be used on talk pages.

Hawkeye7 (discuss) 17:56, 11 December 2024 (UTC)[reply]

@Hawkeye7: That's intended behavior. It links to the root talk page to prevent red links on pages like the one listed at Template talk:Archive/Archive 3 § The "current talk page" link will break for "/YEAR/Month" archives. I don't see why it cannot be used on talk pages. – 🌻 Hilst (talk | contribs) 20:37, 11 December 2024 (UTC)[reply]
I thought it would be more flexible than that. I have replaced it with a hand-written tmbox. Hawkeye7 (discuss) 21:17, 11 December 2024 (UTC)[reply]
You can use the |text= parameter for a hand-written message.[1] I don't know if there's a clever solution to the many different usages of subpages. Before Andy Mabbet's suggestion,[2] the archive banner templates just didn't give a link. Rjjiii (talk) 02:44, 12 December 2024 (UTC)[reply]
@SilverLocust, Gonnym, and Plastikspork: the last four people to edit the module. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 08:29, 12 December 2024 (UTC)[reply]
It probably can check if the current parent exists, if it does, use that, if it doesn't, use the root page. Gonnym (talk) 08:33, 12 December 2024 (UTC)[reply]
@Gonnym: That seems sensible, Can it check for redirects, though? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 09:09, 12 December 2024 (UTC)[reply]
A title object has isRedirect. There are also Module:Redirect and Module:Pagetype so between these three, I'm sure it's covered. Gonnym (talk) 11:04, 12 December 2024 (UTC)[reply]

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

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.
Not really a bug: For archives that are in the wrong namespace the template still points the link to the wrong page, but I don't think there is an automatic solution for that and am not sure how those pages came to be in those places (Template:Editnotices/Page/User talk:Callanecc/Archive 28, User:Hoary/Archive02, Wikipedia:Articles for deletion/List of lifestyles, etc.). Rjjiii (talk) 03:14, 30 December 2024 (UTC)[reply]
@Gonnym, Hawkeye7, Hilst, & Pigsonthewing: what do you all think about pushing this live? Are there any other changes to make first? Rjjiii (talk) 19:03, 2 January 2025 (UTC)[reply]
LGTM. – 🌻 Hilst (talk | contribs) 23:04, 9 January 2025 (UTC)[reply]

Different ways to handle annual archives

[edit]

I am testing something in the sandbox. Check out the fake archives for User talk:Rjjiii (ii), such as User talk:Rjjiii (ii)/Archive 2004. Is this a better way to handle annually archived pages? Is the {{Annual archive}} method better? Pinging DMacks who raised the issue regarding Wikipedia talk:WikiProject Chemicals/Archive 2015 above for thoughts, Rjjiii (talk) 07:39, 21 January 2025 (UTC)[reply]

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)[reply]
The changes above are now live. They'll add navigational links to the few thousand annual archives, like Talk:Tautology (rhetoric)/Archive 2006, that did not previously have them. This should allow {{annual archive}} to become a redirect, but I'll hold off on that to see if bugs are discovered. Rjjiii (talk) 15:50, 3 May 2025 (UTC)[reply]

Template:Annual archive now redirects to this template

[edit]

Per the discussions at Wikipedia:Templates for discussion/Log/2025 April 25#Template:Annual archive, {{annual archive}} redirects to this template. Its various parameters are not needed by {{archive}} because Module:Archive extracts them from the page title. In the merge proposal, I mentioned several ways to change to the blurb text generated by this template:

  • The |text= parameter will replace the default blurb with anything an editor writes.
  • It's not yet in the documentation, but {{archive|type=archive}} will give nearly the same language as used by the former {{annual archive}}. Nobody mentioned a desire for this ability or objected to it in the merge discussion. If "type=archive" goes unused, it can be removed from the module.

Rjjiii (talk) 01:37, 6 May 2025 (UTC)[reply]

Is there a way to turn off __NONEWSECTIONLINK__, as it used to be in the annual archive? I used it specifically because it didn't have this option. Primefac (talk) 12:50, 11 May 2025 (UTC)[reply]

Template:Talk archive used to work better

[edit]

I set up my talk page archives with arbitrary names. I created a page User talk:Anomalocaris/archivelist, with contents

:[[User talk:Anomalocaris/Archive 2006–2013|2006–2013]] • [[User talk:Anomalocaris/Archive 2014|2014]] • [[User talk:Anomalocaris/Archive 2015|2015]] • [[User talk:Anomalocaris/Archive 2016|2016]] • [[User talk:Anomalocaris/Archive 2017|2017]] • [[User talk:Anomalocaris/Archive 2018|2018]] • [[User talk:Anomalocaris/Archive 2019|2019]] • [[User talk:Anomalocaris/Archive 2020|2020]] • [[User talk:Anomalocaris/Archive 2021|2021]]

which displays as

2006–201320142015201620172018201920202021

This page is explicitly linked by User talk:Anomalocaris, where the page begins

{{Archives | archivelist = /archivelist | search=yes}}

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