Module talk:Archive
Red links are back
After the merge, {{aan}} shows red links to archive pages that don't exist yet; e.g. at Talk:Intergovernmental_Panel_on_Climate_Change/Archive_12.--Oneiros (talk) 18:21, 18 October 2014 (UTC)
- @Oneiros: I think I had a reason for doing it that way after reading the TfD discussion, but if people are seeing it as a bug, then keeping the old behaviour is probably best. I've changed the module so that {{aan}} suppresses red links by default. You can always change this on individual archive templates by setting
|noredlinks=yes
or|noredlinks=no
. — Mr. Stradivarius ♪ talk ♪ 03:45, 31 October 2014 (UTC)
Link to non-existing archive should not be selflink
@Mr. Stradivarius: The top of Talk:Annexation of Crimea by the Russian Federation/Archive 8 currently displays a blue "Archive 7" link followed by two bold black unlinked "Archive 8" due to selflinks. The second of these should have been a red "Archive 9" link, and purging the page will make it so (I tested on other newly created archives at [1]). I guess the issue is that when the page was created (via the API if it matters), ifexist or a Lua equivalent returned false for the page itself so the module thinks the page itself is the first non-existing archive. It will automatically be fixed by any rerendering of the page but it's confusing while it lasts. Could the module add code to say that if the page being created is registered as the first non-existing archive then add 1 to the archive number in the link? PrimeHunter (talk) 10:27, 14 June 2016 (UTC)
- @PrimeHunter: Hmm, this is an interesting one. I think we need both a fix here and in MediaWiki. It probably makes sense to assume that the current page is the highest archive number if the search for the highest archive number gives a number smaller than the current page's number. At the moment, previewing
{{talk archive navigation}}
in Talk:Annexation of Crimea by the Russian Federation/Archive 18 gives a red link for Archive 17 on the left, a bold non-link for Archive 18 in the centre, and then a red link for Archive 9 on the right. This feels odd and shouldn't be allowed to happen. Or a better idea may be to implement Redrose64's suggestion at Template talk:Automatic archive navigator#Other archives, which would fix both this issue and the issue brought up in that thread. In addition, it sounds like there is a bug in the handling of Scribunto's #ifexist equivalent or in the MediaWiki code it is calling. Pages being created should be treated as existing, and if somehow they are not being treated as existing when they are parsed, that is a problem. — Mr. Stradivarius ♪ talk ♪ 11:06, 14 June 2016 (UTC)- I have encountered missing sequential archive numbers before but don't know how common it is. If the module detects it then I suggest adding a maintenance category like Category:Archives with missing earlier archives. A red link to the first missing archive will be helpful for the cleanup so I suggest keeping it but maybe add "(first missing archive)" after the link. The text could link to Category:Archives with missing earlier archives if that page is created with an explanation and cleanup suggestions like to move the archives and check whether the page being archived has a wrong counter in an archiving template such as
counter
at User:MiszaBot/config#Parameters explained. There could be an optional parameter to ignore missing archives. - I previewed {{talk archive navigation}} on Talk:Annexation of Crimea by the Russian Federation/Archive 9 and got the correct result: A red link to Talk:Annexation of Crimea by the Russian Federation/Archive 10. I saved the page and got the same correct result. I have deleted the page again. So the #ifexist issue may not be in Scribunto but in pages created via the API, like when bots create archives. I don't know the API well enough to test an API creation of a page using #ifexist to test for itself without Scribunto. PrimeHunter (talk) 12:31, 14 June 2016 (UTC)
- I have encountered missing sequential archive numbers before but don't know how common it is. If the module detects it then I suggest adding a maintenance category like Category:Archives with missing earlier archives. A red link to the first missing archive will be helpful for the cleanup so I suggest keeping it but maybe add "(first missing archive)" after the link. The text could link to Category:Archives with missing earlier archives if that page is created with an explanation and cleanup suggestions like to move the archives and check whether the page being archived has a wrong counter in an archiving template such as
Next archive link broken
Go to any of
- MediaWiki talk:Common.js/Archive 17
- MediaWiki talk:Common.js/Archive 18
- MediaWiki talk:Common.js/Archive 19
- MediaWiki talk:Common.js/Archive 20
- MediaWiki talk:Common.js/Archive 21
the right-hand link should be a link to the next archive - blue for the first four of these, red on the last one because MediaWiki talk:Common.js/Archive 22 doesn't exist. But on all of them, it's a redlink to the wrong archive - MediaWiki talk:Common.js/Archive 3. This is a bug. --Redrose64 (talk) 20:31, 18 October 2016 (UTC)