Jump to content

Help talk:Citation Style 1/Archive 78

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by ClueBot III (talk | contribs) at 02:07, 6 September 2021 (Archiving 1 discussion from Help talk:Citation Style 1. (BOT)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Archive 75Archive 76Archive 77Archive 78Archive 79Archive 80Archive 85

when |archive-url= is broken

In normal display mode (what readers see), broken archive urls are ignored except that the module emits an error message. When editors view the same article in preview mode, and when the archive url is an archive.org url, the module uses a modified form of the archive url. The purpose of that is to enable editors to see archive.org's calendar view so that they might choose the url of an appropriate snapshot to replace the malformed archive url in the template. When |archive-url= holds a malformed archive url, the live module truncates the timestamp from 14 to 6 digits and appends a splat (*). That used to work. So, I have tweaked the code so that the new preview-mode archive url uses the first six (YYYYMM) or four (YYYY) digits of the timestamp, zero-fills to 14 digits, and then appends the splat. To see this in action, you must edit this section (or page) and preview.

Cite web comparison
Wikitext {{cite web|access-date=November 3, 2008|archive-date=2017-06-14|archive-url=https://web.archive.org/web/20170614/http://www.intellivisionlives.com/bluesky/people/askhal/askhal.html|publisher=Intellivision Productions|title=Ask Hal: Frequently Asked Questions to the Blue Sky Rangers|url=http://www.intellivisionlives.com/bluesky/people/askhal/askhal.html}}
Live "Ask Hal: Frequently Asked Questions to the Blue Sky Rangers". Intellivision Productions. Retrieved November 3, 2008. {{cite web}}: |archive-url= is malformed: timestamp (help)
Sandbox "Ask Hal: Frequently Asked Questions to the Blue Sky Rangers". Intellivision Productions. Retrieved November 3, 2008. {{cite web}}: |archive-url= is malformed: timestamp (help)

In the above examples, the live version links to a "We're sorry — something's gone wrong" page while the sandbox links to the calendar view.

Trappist the monk (talk) 19:38, 5 August 2021 (UTC)

Thanks for making this feature work again. (For those interested in the background of this feature, see: Help_talk:Citation_Style_1/Archive_13#web.archive.org/save/...)
However, the "*"-wildcard still seems to work fine with 0-, 4- and 8-digit timecodes, so the zero-filling does not appear to be necessary in all cases:
BTW, if you truncate the archive URL to |archive-url=https://web.archive.org/web/20170614 or shorter, the new implementation throws a Lua error in "Module:Citation/CS1/sandbox at line 2379: attempt to index local 'timestamp' (a nil value)."
The utility of the feature could be further improved if we would allow it to accept |archive-url=http://web.archive.org/web/ as an entry shortcut forcing it to take the URL from the |url= parameter and optionally the timestamp from the |archive-date= parameter to automatically form archive URLs like https://web.archive.org/web/*/http://www.intellivisionlives.com/bluesky/people/askhal/askhal.html or https://web.archive.org/web/20170614*/http://www.intellivisionlives.com/bluesky/people/askhal/askhal.html for the error message, so that editors could utilize our preview to select or create a snapshot from/at archive.org with a minimum amount of keystrokes.
--Matthiaspaul (talk) 02:55, 6 August 2021 (UTC)
Fixed the script error:
Cite web comparison
Wikitext {{cite web|access-date=November 3, 2008|archive-date=2017-06-14|archive-url=https://web.archive.org/web/20170614|publisher=Intellivision Productions|title=Ask Hal: Frequently Asked Questions to the Blue Sky Rangers|url=http://www.intellivisionlives.com/bluesky/people/askhal/askhal.html}}
Live "Ask Hal: Frequently Asked Questions to the Blue Sky Rangers". Intellivision Productions. Retrieved November 3, 2008. {{cite web}}: |archive-url= is malformed: timestamp (help)
Sandbox "Ask Hal: Frequently Asked Questions to the Blue Sky Rangers". Intellivision Productions. Retrieved November 3, 2008. {{cite web}}: |archive-url= is malformed: timestamp (help)
Trappist the monk (talk) 11:39, 6 August 2021 (UTC)