Template talk:Archive
![]() | Template:Archive is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This is the talk page for discussing improvements to the Archive template. |
|
Archives: 1, 2, 3Auto-archiving period: 28 days ![]() |
![]() | This template was nominated for merging. Please review the prior discussions if you are considering re-nomination:
|
The "current talk page" link will break for "/YEAR/Month" archives.
[edit]![](http://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Purple_arrow_down.svg/20px-Purple_arrow_down.svg.png)
Check out these two pages:
- {{aan}}
- User talk:EuroCarGT/Archives/2013/July (red link to User talk:EuroCarGT/Archives/2013)
- {{talk archive}}
- User talk:EuroCarGT/Archives/2013/July (blue link to User talk:EuroCarGT)
I came across this while converting pages that use {{archive}}+{{archive navigation}} to {{aan}} in order to merge {{archive}}. I haven't looked into solutions yet. Rjjiii (talk) 21:26, 6 July 2024 (UTC)
- Pinging folks I see have edited the lua modules: @Mr. Stradivarius, Paine Ellsworth, DannyS712, Hilst, Toohool, Xaosflux, Pppery, and Andrybak:
- Template:Archive constructs the link as
[[{{{1|{{#ifexist:{{TALKSPACE}}:{{BASEPAGENAME}}|{{TALKSPACE}}:{{BASEPAGENAME}}|{{SUBJECTSPACE}}:{{BASEPAGENAME}}}}}}}|current main page]].
This template is callingmw.title.getCurrentTitle()
. Rjjiii (talk) 12:32, 11 July 2024 (UTC)- @Rjjiii: Special:Diff/1234343052 seems to fix it (see User talk:Hilst/Archives/2013/July). Since you're a template editor, could you please sync the main module? –
Hilst [talk]
21:40, 13 July 2024 (UTC)- Unfortunately, this seems to break one of the testcases at Template:Automatic archive navigator/testcases/TestArchive1. —andrybak (talk) 21:55, 13 July 2024 (UTC)
Fixed! Is this really intended behavior though? –
Hilst [talk]
22:04, 13 July 2024 (UTC)- Thanks Hilst, I've just pushed it live, Rjjiii (talk) 08:14, 20 July 2024 (UTC)
- Unfortunately, this seems to break one of the testcases at Template:Automatic archive navigator/testcases/TestArchive1. —andrybak (talk) 21:55, 13 July 2024 (UTC)
- @Rjjiii: Special:Diff/1234343052 seems to fix it (see User talk:Hilst/Archives/2013/July). Since you're a template editor, could you please sync the main module? –
Edge case issue for notice boards.
[edit]![](http://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Purple_arrow_down.svg/20px-Purple_arrow_down.svg.png)
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)
- @Rjjiii: Done! Check out the sandbox version. – Hilst (talk | contribs) 14:02, 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)
- @Rjjiii, could you check out the changes I've made? We should be ready to finish the merge now (unless {{archive}} or {{archive navigation}} have some functionality that I've missed :v). – Hilst (talk | contribs) 19:24, 25 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: - Examples commented out after fixes.
- Not sure what the issue is, Rjjiii(talk) 19:37, 26 July 2024 (UTC)
- @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. - My plan is to leave {{Automatic archive navigator}} up for a few days in case something goes awry and then convert this template and talk page into redirects. Rjjiii (talk) 20:16, 26 July 2024 (UTC)
- 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.
- – Hilst (talk | contribs) 20:35, 26 July 2024 (UTC)
- "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.
- Gotcha, I'll likely do the moves this afternoon.
- Rjjiii (talk) 21:22, 26 July 2024 (UTC)
- 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.[1] 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)
- "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
- @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)
- 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)
Ready to merge
[edit]Per discussions at the other two templates,[2][3] I think this is ready to merge. In case there are any unexpected issues, perhaps the code from Template:Automatic archive navigator should be copied over first, and then the modules and subpages moved over? The remaining uses of Template:Archive navigation are a bunch of weird quirky things and won't affect replacing this template with {{automatic archive navigator}}. Rjjiii (talk) 05:14, 22 July 2024 (UTC)
- Now merging the two templates, Rjjiii (talk) 00:52, 27 July 2024 (UTC)
- Template talk:Automatic archive navigator got archived while I was writing up a reply to you :V. Regardless, many thanks for finishing up the merge and reporting issues, I really appreciate it! – Hilst (talk | contribs) 01:17, 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 talk:Automatic archive navigator got archived while I was writing up a reply to you :V. Regardless, many thanks for finishing up the merge and reporting issues, I really appreciate it! – Hilst (talk | contribs) 01:17, 27 July 2024 (UTC)
Template-protected edit request on 28 July 2024
[edit]![]() | This edit request to Module:Archive has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please move the config page from Module:Automatic archive navigator/config (under a redirect) to Module:Archive/config, and perform the following edit to the main module:
Line 342: | Line 342: |
function p._aan(args, cfg, currentTitle) | function p._aan(args, cfg, currentTitle) |
cfg = cfg or mw.loadData('Module: |
cfg = cfg or mw.loadData('Module:Archive/config') |
currentTitle = currentTitle or mw.title.getCurrentTitle() | currentTitle = currentTitle or mw.title.getCurrentTitle() |
local aan = Navigator.new(args, cfg, currentTitle) | local aan = Navigator.new(args, cfg, currentTitle) |
– Hilst (talk | contribs) 12:45, 28 July 2024 (UTC)
- This should be done. There is one other template invoking Module:Automatic archive navigator/config, {{Automatic archive navigator editsection}}. JPxG, that second template appears to only be used in your user space. Do you mind moving the module and making the change above to Module:Archive and Module:Automatic archive navigator editsection. Rjjiii (talk) 21:26, 28 July 2024 (UTC)
- 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)
- Ah, I did not realize I was asking a big-ass thing. Let me go ahead and knock out most of it. Rjjiii (talk) 20:01, 29 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.[4] 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)
Done. – Hilst (talk | contribs) 21:56, 29 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.[4] 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)
- Ah, I did not realize I was asking a big-ass thing. Let me go ahead and knock out most of it. Rjjiii (talk) 20:01, 29 July 2024 (UTC)
- 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)
Link to page discussed
[edit]Repeating my previous request, before this template was merged with {{aan}}:
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.
Are there any edge cases where this would not be appropriate, that need to be catered for? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:36, 28 July 2024 (UTC)