Template talk:Automatic archive navigator

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Type attribute[edit]

(Thread started on User talk:Ash and relocated for future convenience:)

Pages are misusing the "type" attribute to present this template as a "content" tmbox, which it isn't. There should be no need to override the "type" attribute. I've fixed the mistaken use of this parameter in various auto archivers where it was producing bad results, but removing it from the template code itself is the best way to fix them all at once. The big red error message was present in the old code; it was simply hidden behind an includeonly so that it wouldn't appear under the template page. As you wrote the template, you're probably the best person to properly fix that, but the old hack can easily be re-added. And as far as deployment goes, less than 500 transclusions on a template like this is really pretty low; limit it to the talk and Wikipedia talk namespaces (to avoid all the links which are part of the template logic itself) and there are less than a hundred transclusions. I don't particularly see the need to have yet another archive banner anyway, but for the time being it's best that it visually mirrors the other ones (indeed, this one may be a suitable replacement for {{talkarchivenav}} in the long run, as it has neater auto-detection). Any other thoughts? Chris Cunningham (not at work) - talk 16:16, 10 January 2010 (UTC)

Sounds like a good fix to me, so long as the documentation is trimmed in line with the change. I wrote the script in order to have more intelligent auto-detection and debugging it took aaages so I suggest making use of the test pages that already exist as pointed to in the current documentation to ensure the variations still format correctly. No problem if you roll it out, I'll add a note if any glitches appear.—Ash (talk) 16:32, 10 January 2010 (UTC)
Great. I'll roll out the changes and update the documentation tomorrow. Chris Cunningham (not at work) - talk 17:37, 10 January 2010 (UTC)

Bugs with latest change[edit]

There seem to be two problems with the new version as demonstrated by the variations at Template:Aan/Archive_101.

  • The page names have lost style formatting below the text notice, these previously inherited the same style as the text. This feature is particularly useful if indexing a range of pages that may not be standard archives and the banner may even be used as a page footer with small fonts. I designed the sub-notice page names to be boxed for style reasons and don't see why having them floating outside of a box is a beneficial change and may cause problems if the user sets the optional style parameters.
  • The parameter for customizing left hand image has been lost - this was a neat feature that I certainly would like working again.

Ash (talk) 11:49, 11 January 2010 (UTC)

I have rolled back until the above issues are addressed.—Ash (talk) 03:40, 13 January 2010 (UTC)
The sandbox code has been updated to account for the obvious bugs. The styling cruft is precisely why people shouldn't be cooking up their own archive templates: Wikipedia is not an easel, and it is not actually important that people are able to choose the exact colours of all the templates that they use. I think the current state of the sandbox is an acceptable compromise at this point. I'm prepared to backmerge said code with the original template at this point, barring any obvious bugs. Chris Cunningham (not at work) - talk 10:04, 19 January 2010 (UTC)
I disagree on the styling issue. This template (as documented) can be used in its default state to create headers for standard archives, it can also be used to index any other numbered sub-page including personal talk page archives or used as a more complex footer template for indexed pages. By chopping out these optional user parameters, the functionality is much reduced and would lead to having to create yet more archive template alternatives rather than having a useful generic and customizable alternate. The styling you prefer has been in use on {{atn}} but there is no particular reason to think this was by a robust consensus. Of course, you are free to copy this template and make a more style-restricted alternative.—Ash (talk) 10:10, 19 January 2010 (UTC)
I'm opposed to the proliferation of unnecessary template forks; that's what this still is in my opinion. Right now, practically every transclusion uses the basic syntax and ignores the extreme levels of customisation built into it. We should not be encouraging people to come up with weird and wacky new ways to flag archive pages; instead, we should encourage the use of a simple set of standards which make things easier for both readers and automated tools. Once the useful changes from this template (and it certainly has noticeable improvements over {{atnhead}}) have been back-ported, I think redirection will be appropriate for this template. Chris Cunningham (not at work) - talk 10:25, 19 January 2010 (UTC)
Okay, that's your viewpoint, it's not a consensus. At a minimum I would like to see user talk page archives have a different style to article archives. As there is not an accepted standard for user page archive naming (I archive mine by year number), or style, this seems a useful and reasonable customization.—Ash (talk) 11:01, 19 January 2010 (UTC)
That can be decided in a more centralised discussion, such as on TfD. But there's no rush. Chris Cunningham (not at work) - talk 11:57, 19 January 2010 (UTC)
As the discussion is not about deletion, TfD doesn't fit the bill. I suggest a RfC at Help talk:Archiving a talk page might suit if the issue is how much user-customization of styles should be included.—Ash (talk) 12:02, 19 January 2010 (UTC)
TfD is soon to be renamed to templates for discussion, which should help. It's the best place to get a wider opinion on the subject of a merge. The help talk namespace is seldom frequented. Chris Cunningham (not at work) - talk 13:43, 19 January 2010 (UTC)

Current status[edit]

For now, I'm removing {{{type}}} again. It's misleading and, due to some unforeseen reason, has already resulted in several pages being marked as type=content for no reason which gives them bright orange borders. Chris Cunningham (not at work) - talk 13:45, 19 January 2010 (UTC)

Is this still an issue with type paramenter misusing? Can I do AWB bot run to correct this? Is it properly used in any cases? I assume all article talk page archives should not have the type=content. Reasoning for the changes something like this? --Kslotte (talk) 13:32, 12 July 2010 (UTC)
It's no longer an "issue" as such as type no longer does anything at all; however, as it's an invalid parameter it should be removed from any existing transclusions. Chris Cunningham (not at work) - talk 14:14, 14 July 2010 (UTC)
Here was it removed. Before the default was the archive image, but now it is the information image that is shown. Should it be corrected? --Kslotte (talk) 14:25, 14 July 2010 (UTC)
D'oh. Fixed. Thanks. Chris Cunningham (not at work) - talk 08:24, 15 July 2010 (UTC)
We need to remove the parameter to get an end of using the parameter. I was thinking of putting my KslotteBot into work. A few test edits already made. I will also replace the auto-archive bot archive settings. Do I get a consensus to proceed? --Kslotte (talk) 17:11, 15 July 2010 (UTC)
Support --Oneiros (talk) 23:38, 15 July 2010 (UTC)
No objections. This shouldn't be at all controversial, as it has no effect on deployed instances. Chris Cunningham (not at work) - talk 12:45, 17 July 2010 (UTC)
AWB bot run has been done. About 1000 edits. --Kslotte (talk) 10:12, 5 September 2010 (UTC)

De facto standard[edit]

I'm wondering thy this template isn't used as the de facto standard for archives? Is there some issues with this template before it can be "released"? This template seems to have the best usability compared to others. --Kslotte (talk) 18:12, 12 July 2010 (UTC)

I'd prefer a merge rather than simply promoting one over the other. That way we get consistency across both old and future deployments. Chris Cunningham (not at work) - talk 14:16, 14 July 2010 (UTC)
Sounds as good plan. Any merge schedule? What are we waiting for? --Kslotte (talk) 14:26, 14 July 2010 (UTC)
A conclusion to the discussion above regarding the preferred styling. Might be a while yet. Chris Cunningham (not at work) - talk 14:46, 14 July 2010 (UTC)


Examples at Template:Aan/Archive_101 seems to be outdated. The layout doesn't correspond to what the template actually generate. --Kslotte (talk) 14:33, 14 July 2010 (UTC)

Module merged with Template:Talk archive navigation[edit]

I've just updated Module:AutomaticArchiveNavigator to complete the requested merge at Wikipedia:Templates for discussion/Log/2013 November 12#Template:Talk archive navigation. Now, this template is the same as {{talk archive navigation}}, but with different default settings. The archive links are now displayed below the banner, like {{talk archive navigation}}, although the arrows still appear after the first skip in numbering like they used to. There are a few new options as well. You can change the number of links displayed with |links=n, and you can set an archive prefix with |prefix=, so, for example, this will now work on ANI archives with the code |prefix=IncidentArchive. Please leave a message at Module talk:AutomaticArchiveNavigator if you spot any issues with the module code. — Mr. Stradivarius ♪ talk ♪ 07:15, 9 October 2014 (UTC)

For want of a rapier a bludgeon was used (attributed to Bomber Harris)[edit]

The archive

exists, but

was a redirect from

and{{aan}} incremented as expected until archive 130 but then stopped working. From 130 onwards there were neither forward or back links. This appears connected to the change in name as for newer MOS sub pages the algorithm seems to handle sub-page of a sub-page.

I guess the elegant (rapier) solution is to patch this algorithm, but for want of a rapier I have used the bludgeon approach: I created a page

This seems to give the algorithm something to get its teeth into and page 130 {{aan}} showed red links below as expected (but no page 131), so I then created similar links for the red pages:

Hopefully when the database catches up it will create links for all the aan's from 130 upwards.

-- PBS (talk) 18:56, 22 April 2015 (UTC)

@PBS: That will only work if you create redirects for all the archives, from 1 all the way through to 130. The module assumes that if it finds an archive that doesn't exist, then there must be no higher-numbered archives for that prefix. So as Wikipedia talk:Manual of Style/Dates and numbers/Archive 3 and upwards don't yet exist, the module assumes that the highest archive is Wikipedia talk:Manual of Style/Dates and numbers/Archive 2. It also assumes that pages with lower archive numbers than the current page also exist, which is why the links for the lower archive numbers show up at Wikipedia talk:Manual of Style/Dates and numbers/Archive 130. To fix this in the algorithm we would need to specify both page prefixes and check archives at both prefixes for existence. However, this would double the number of expensive parser function calls needed, which would not be a very good design decision as we are only allowed 500 of them per page. The alternatives are to either create all the redirects as I mentioned above, or to just move all of the archives to one prefix. (I can do either of those with some script magic if you like.) Or you could set all of the aan transclusions to use |noredlinks=no so it will display the links even if it thinks they don't exist. — Mr. Stradivarius ♪ talk ♪ 23:04, 22 April 2015 (UTC)
Actually, thinking about it, there is a better way to do the search - we could start at the current archive, then search both above and below for the number of links that we want to display. That would fix the higher archive numbers in this case, but it would still break around the point where the archive prefixes switch. You could always patch those with redirects, but having the same prefix would be neater I think. — Mr. Stradivarius ♪ talk ♪ 23:18, 22 April 2015 (UTC)
As I said bludgeon, (I could create them as well using AWB)!
I think that altering the start to the current archive number is the most elegant solution, with look back and forward from that point (and only display them if the exist). No need for page prefixes, one ends up with complicated interfaces when options like this only occur occasionally. In this current example, we would only need to create a minimum of two redirects for the list to continue, and 10 if it is to appear completely seamless. As we are only talking about talk page archive navigation, I think that two would usually suffice. -- PBS (talk) 23:45, 22 April 2015 (UTC)

Other archives[edit]

Why does this only display earlier archives, not later ones? For example, see Wikipedia talk:Manual of Style/Dates and numbers/Archive 145 where archives 140, 143 and 144 are listed, but not archives 146, 147 or 150, all of which exist.

I would fix it myself, but it's been Lua-ised. --Redrose64 (talk) 11:16, 23 March 2016 (UTC)

This is because it uses Module:Highest archive number to find the maximum archive number to display, and that module uses a binary search to reduce the number of expensive function calls it uses. The early archives of the dates and numbers pages are at "Wikipedia talk:Manual of Style (dates and numbers)/Archive n", but the module is searching for archives like "Wikipedia talk:Manual of Style/Dates and numbers/Archive n". The archives from Wikipedia talk:Manual of Style/Dates and numbers/Archive 3 to Wikipedia talk:Manual of Style/Dates and numbers/Archive 124 don't exist, which confuses the algorithm. At the moment, it thinks that the highest archive number is 2. This could be fixed by creating redirects for all of the "Wikipedia talk:Manual of Style/Dates and numbers/Archive n" pages. Or if there's a demand for it, it would be possible to add different prefixes to the algorithm, at the cost of multiplying the number of expensive function calls by the number of prefixes to be checked. — Mr. Stradivarius ♪ talk ♪ 12:12, 23 March 2016 (UTC)
It shouldn't need to. Start at n (in this case 145), look for n-1 n-2 n-5 which will turn up 144, 143, 140; then look for n+1 n+2 n+5 which will turn up 146, 147, 150. --Redrose64 (talk) 12:17, 23 March 2016 (UTC)
There's a complicating factor - as part of my effort to standardise {{aan}} and {{tan}}, I added a |links= parameter which can specify an arbitrary number of links to be displayed. Try previewing {{aan|links=20}} at User talk:Jimbo Wales/Archive 118, for example. The default for {{aan}} is seven links, and for {{tan}} it is three, but both numbers can be overridden. I see that I have very unhelpfully left this parameter undocumented since October 2014, so I'll go and correct that now. As for fixing the module, it could be done with two binary searches, one ascending and one descending, starting at the current archive. Alternatively we could get rid of the |links= parameter; given that it hasn't been documented until now, presumably it is only being used in the module itself. Although it may be prudent to add a tracking category for it, just in case people have found out about it in some other way. — Mr. Stradivarius ♪ talk ♪ 12:36, 24 March 2016 (UTC)

Is this template supported by any policy?[edit]

The current wording of "do not" seems too strong if no policy exists which is against editing archive pages. -- Kendrick7talk 02:00, 19 May 2016 (UTC)

There is nothing wrong with the wording. As I explained in response to your related question at Wikipedia talk:Talk page guidelines, there is no policy that archive pages can not be modified. There is though a general practice that they aren't modified. We generally do not modify them because it gives a false impression of the conversation that happened. There are times though, such as the incident that led you here, where it is appropriate to modify an archive. If we reduce the wording there could be more edit warring over changes as editors try to push the limits. In short the wording is appropriate and at times we might need to ignore it to do the right thing. -- GB fan 10:40, 19 May 2016 (UTC)
It seems that we have two discussions going (the original is here), which goes against WP:MULTI. --Redrose64 (talk) 10:51, 19 May 2016 (UTC)
My mistake, three discussions: but this one is closed. That goes against WP:FORUMSHOP. --Redrose64 (talk) 10:53, 19 May 2016 (UTC)
Not forum shopping, just asking questions. So if there's no policy backing this template, I'll send it to WP:MfD. -- Kendrick7talk 01:27, 25 May 2016 (UTC)
Templates go to WP:TFD, not WP:MFD. Also, having spotted Wikipedia talk:Requests for comment#Is there a time limit for admins to change their mind about how they closed an Rfc? on my watchlist, I now make it four discussions. --Redrose64 (talk) 08:43, 25 May 2016 (UTC)

Bug: Missing links to next archives[edit]

See Wikipedia talk:WikiProject Chemicals/Archive 2015, where there are links to previous:

Archive 2010Archive 2013 Archive 2014 Archive 2015

to this current archive (2015) but no link to the next (Archive 2016). 2016's does actually exist; the same problem appears on all earlier archives as well. The template (or underlying module or submodule) always thinks the one being viewed is the last one available. DMacks (talk) 20:15, 18 March 2017 (UTC)

Ah, I see now #Other archives above, from almost a year ago reporting this same problem. In the case at hand, we have years not serial-numbers, so "just create the lower missing ones" is not a viable solution. The use of years appears to be one of MiszaBot's standard archive layouts, so this is probably not a one-off use-case situation. Definitely a missing feature that Module:Highest archive number only supports starting at "1" rather than an optional parameter for where to start the search. DMacks (talk) 20:22, 18 March 2017 (UTC)
@DMacks: I would have fixed it myself, only the code has been converted to Lua, and so is no longer understandable even by those who are a whizz at proper template coding. --Redrose64 🌹 (talk) 10:01, 19 March 2017 (UTC)

Centering first/last archive[edit]

Is there a way to center first archive because it is misinformative when there are two archives center together relatively to the template (first thought is that there are only those two archives). Maybe to add invisible Archive 0 left to the Archive 1, so 1 and 2 move to the right and get centered.

Also, I don't see reason for default red last archive link; you cannot navigate to it because it doesn't exist (that link should be changed to "Make Archive ?" if goal was to have red link so that user can click and make next archive). If last one gets removed, same thing applies: something should take its space so that first and second displayed arhives are to the left and center, not both centered alltogether.--Obsuser (talk) 12:19, 9 May 2017 (UTC)