Help talk:Citation Style 1/Archive 78
![]() | This is an archive of past discussions about Help:Citation Style 1. 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. |
Archive 75 | Archive 76 | Archive 77 | Archive 78 | Archive 79 | Archive 80 | → | Archive 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.
Wikitext | {{cite web
|
---|---|
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:
- https://web.archive.org/web/*/http://www.intellivisionlives.com/bluesky/people/askhal/askhal.html works
- https://web.archive.org/web/2017*/http://www.intellivisionlives.com/bluesky/people/askhal/askhal.html works
- https://web.archive.org/web/201706*/http://www.intellivisionlives.com/bluesky/people/askhal/askhal.html now fails
- https://web.archive.org/web/20170614*/http://www.intellivisionlives.com/bluesky/people/askhal/askhal.html works (but zero-fills automatically)
- 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 likehttps://web.archive.org/web/*/http://www.intellivisionlives.com/bluesky/people/askhal/askhal.html
orhttps://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:
Wikitext | {{cite web
|
---|---|
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)
|
Cite magazine – why upper case Vol.?
Why does {{Cite magazine}} emit volume in upper case: {{cite magazine|title=Some title|magazine=Some Magazine|volume=17}} -> "Some title". Some Magazine. Vol. 17. ? -- Michael Bednarek (talk) 09:23, 7 August 2021 (UTC)
- Because it follows a period. Headbomb {t · c · p · b} 10:39, 7 August 2021 (UTC)
- OK. Sorry if I'm a pest, but why then is page in lower case? — "Some title". Some Magazine. Vol. 17. p. 18. -- Michael Bednarek (talk) 13:36, 7 August 2021 (UTC)
- I don't think you're a pest, but the odds against getting a coherent answer to that are astronomical. Headbomb is right, of course, as you are in your question. 12.182.249.131 (talk) 14:16, 7 August 2021 (UTC)
- Why do I hear Tevye in my head when he says, while singing "Tradition":
- "You may ask, how did this tradition start?
- I'll tell you – I don't know. But it's a tradition..."
- —Trappist the monk (talk) 16:10, 7 August 2021 (UTC)
- OK. Sorry if I'm a pest, but why then is page in lower case? — "Some title". Some Magazine. Vol. 17. p. 18. -- Michael Bednarek (talk) 13:36, 7 August 2021 (UTC)
display-authors bug
If you specify just one author and then invoke display-authors=1, you get an error. You need to specify an author2 to make it go away (even though author2 isn't displayed!). Urhixidur (talk) 15:19, 4 August 2021 (UTC)
- You will get the same error when you have two authors and set
|display-authors=2
: - It is supposed to work that way. When there are only two authors, setting
|display-authors=2
becomes meaningless. When there are more than two authors and you only want to display one of their names, then|display-authors=1
will suppress display of the second author name and add et al. to the rendering: - When the template has only one of the two authors, set
|display-authors=etal
to indicate that the work has more authors whose names are not shown: - —Trappist the monk (talk) 15:28, 4 August 2021 (UTC)
- The (help) link provides the three paths to fixing this error. Izno (talk) 16:14, 4 August 2021 (UTC)
- As an aside - the Harv warning has changed to be bold from a brown-ish colour in the last couple of days - any idea what has changed? Keith D (talk) 13:00, 6 August 2021 (UTC)
- There are two warnings for SFN. One set is emitted by the SFN module. Those are in red. The other set are from whichever of the three-ish scripts that detect bad SFNs. Those are the brown-ish color. While they may have changed in shade or something, the latter has always been that color. Izno (talk) 13:36, 6 August 2021 (UTC)
- My script has not changed and shows the warning messages for the above citations like this:
<span class=warning style="font-size:100%">Harv warning: There is no link pointing to this citation. The anchor is named CITEREFFirst_Author.</span>
- Harv warning: There is no link pointing to this citation. The anchor is named CITEREFFirst_Author.
- But isn't
class=warning
going away? If it is, I should change the warning markup to:<span style="color:#ac6600">Harv warning: There is no link pointing to this citation. The anchor is named CITEREFFirst_Author.</span>
- Harv warning: There is no link pointing to this citation. The anchor is named CITEREFFirst_Author.
- —Trappist the monk (talk) 14:12, 6 August 2021 (UTC)
- You might consider emitting a class still so people can customize the color, but sure. Izno (talk) 14:55, 6 August 2021 (UTC)
- I am using User:Ucucha/HarvErrors.js Keith D (talk) 19:15, 6 August 2021 (UTC)
- No changes to that script since this edit in March 2021. Yesterday was WP:ITSTHURSDAY, there is some small discussion about skins at WP:VPT about monobook skin stuff; related?
- —Trappist the monk (talk) 19:45, 6 August 2021 (UTC)
- It could be but not clear from that what the changes would be. Looking at phab:T285991 seems to imply some changes needed in preferences, but cannot locate checkbox "Enable responsive MonoBook design". I have tried unticking "Enable responsive mode" but that makes no difference. Keith D (talk) 20:18, 6 August 2021 (UTC)
- @Keith D: "Enable responsive MonoBook design" is no longer there. It was at Preferences → Appearance, between "Shared CSS/JavaScript for all wikis (more information):" and "Reading preferences". I think it was removed when "Enable responsive mode" was added a little higher up. --Redrose64 🌹 (talk) 22:41, 6 August 2021 (UTC)
- Yes, these preferences were flipped; this was in either last week's tech news or the week before's. Izno (talk) 17:41, 8 August 2021 (UTC)
- @Keith D: "Enable responsive MonoBook design" is no longer there. It was at Preferences → Appearance, between "Shared CSS/JavaScript for all wikis (more information):" and "Reading preferences". I think it was removed when "Enable responsive mode" was added a little higher up. --Redrose64 🌹 (talk) 22:41, 6 August 2021 (UTC)
- It could be but not clear from that what the changes would be. Looking at phab:T285991 seems to imply some changes needed in preferences, but cannot locate checkbox "Enable responsive MonoBook design". I have tried unticking "Enable responsive mode" but that makes no difference. Keith D (talk) 20:18, 6 August 2021 (UTC)
- As an aside - the Harv warning has changed to be bold from a brown-ish colour in the last couple of days - any idea what has changed? Keith D (talk) 13:00, 6 August 2021 (UTC)