Help talk:CS1 errors

Latest comment: 14 days ago by Efbrazil in topic How do you find the location of an error?

Overriding date parameter edit

Hello! Over at Template:Marquette (MILW train), there a reference with a legitimate date of January–February–March 1940. Is it possible to override the template error that gives? Ed [talk] [OMT] 23:28, 1 December 2023 (UTC)Reply

No. You can rewrite as:
{{Citation |mode=cs1 |section=No. 18-The Marquette |title=The Milwaukee Road |type=Timetable |date=January–March 1940 |publisher=Chicago, Milwaukee, St. Paul, and Pacific Railway|via=Streamliner Memories |pages=10, 22 |url=https://streamlinermemories.info/Milw/Milw40TT.pdf |access-date=2023-12-01}}
"No. 18-The Marquette". The Milwaukee Road (PDF) (Timetable). Chicago, Milwaukee, St. Paul, and Pacific Railway. January–March 1940. pp. 10, 22. Retrieved 2023-12-01 – via Streamliner Memories.
I used {{citation}} because the timetable is not a magazine. |page=10 (table 18) from the original template is misleading. Table 18 is not on page 10 but rather, is on page 22.
Trappist the monk (talk) 23:59, 1 December 2023 (UTC)Reply
Thank you! I appreciate the work. I went with cite book to match the article it's used in. Ed [talk] [OMT] 00:06, 2 December 2023 (UTC)Reply
I fixed the above to have the correct publisher, Chicago, Milwaukee, St. Paul, and Pacific Railway, not Chicago, Milwaukee, St. Paul, and Pacific. Headbomb {t · c · p · b} 00:08, 5 April 2024 (UTC)Reply

Date error message in cite tweet template edit

Dead Twitter posts have future dates. For example, in List of Miraculous: Tales of Ladybug & Cat Noir episodes:

  • {{cite tweet|user=ChikaraYT|number=13954405235828367744| date=8 April 2016| title=Twitter post}}
  • @ChikaraYT (April 8, 2116). "Twitter post" (Tweet) – via Twitter. {{cite web}}: Check date values in: |date= (help); {{Cite tweet}}: |date= / |number= mismatch (help)

The above message appears because the date value provided (8 April 2116) is 100 years later than the date in the source (8 April 2016). Achmad Rachmani (talk) 00:59, 5 January 2024 (UTC)Reply

And when you clicked on the "help" link in the error message and were taken to the explanatory text, did that help you to resolve the problem? If not, how would you improve the documentation? When I click on that link to Twitter, I get an error, and archive.org does not have a record of the tweet, so the citation may have to be replaced by a citation to a different source. – Jonesey95 (talk) 01:32, 5 January 2024 (UTC)Reply

<param>= has numeric name, triggered by author=e-TF1 edit

The help page says “This error is reported when a name-list parameter ... has an assigned value that is composed solely of digits and / or punctuation” but the author e-TF1 does not appear to be in that category. The full citation is {{cite web |author=e-TF1 |url=http://lci.tf1.fr/biographies/mylene-farmer-4883698.html |title=Mylène Farmer – Actualité, vidéos et photos – MYTF1News |publisher=Lci.tf1.fr |access-date=14 March 2014 |url-status=dead |archive-url=https://web.archive.org/web/20140314064858/http://lci.tf1.fr/biographies/mylene-farmer-4883698.html |archive-date=14 March 2014 }}. The author name appears that way in the source code for the cited page so is likely to be intentional. Should I ignore the error, change the way the author is written, or change the way the cite template is used here? Thanks --Northernhenge (talk) 22:48, 6 February 2024 (UTC)Reply

Maintenance messages are not errors; were there are error, you would see |<param>= has numeric name with a help link to the numeric name help text. Your example template does not emit such a message. The maintenance message CS1 maint: numeric names: authors list is emitted because e-TF1 includes a digit. The message also includes a link to Category:CS1 maint: numeric names: authors list where you can find a description of what the message means.
Were it me, I would rewrite the template like this:
{{cite web |url=http://lci.tf1.fr/biographies/mylene-farmer-4883698.html |title=Mylène Farmer |website=MYTF1News |access-date=14 March 2014 |archive-url=https://web.archive.org/web/20140314064858/http://lci.tf1.fr/biographies/mylene-farmer-4883698.html |archive-date=14 March 2014 |language=fr}}
"Mylène Farmer". MYTF1News (in French). Archived from the original on 14 March 2014. Retrieved 14 March 2014.
Trappist the monk (talk) 01:48, 7 February 2024 (UTC)Reply
Thanks for clarifying and assisting. I have thought of maintenance messages as errors, but they’re clearly different from each other. --Northernhenge (talk) 10:55, 7 February 2024 (UTC)Reply

Can we please reinstate "work=" for "cite book"? edit

Right now there are 27,193 pages (Category:CS1 errors: periodical ignored) that are effected by having "work=" dropped by the "cite book" template. Since this is leaving alot of maintenance work for editors if done manually, I propose that "work=" be reinstated until a backup plan can be put into place. - Knowledgekid87 (talk) 19:12, 2 March 2024 (UTC)Reply

We have fixed much larger error piles in the past. There is no deadline. – Jonesey95 (talk) 20:46, 2 March 2024 (UTC)Reply

How do you find the location of an error? edit

Apologies if this is a dumb question. I'm looking at a page with dozens of {{cite book templates. If you click edit and then preview you get an error at the top of the page saying one or more cite book templates has errors, and the help topic links to this page. Trouble is that I have absolutely no clue where the error or errors are. How are you supposed to figure out the error location so you can fix things? Just the first error location would be fine, then I could fix that one and go on to the next one... Efbrazil (talk) 16:53, 3 April 2024 (UTC)Reply

Error messages are not hidden so they should be visible to you. Maintenance messages (which are not errors) are hidden. You have to enable display of those messages by following the instructions at Help:CS1 errors § Controlling error message display.
Trappist the monk (talk) 17:01, 3 April 2024 (UTC)Reply
Thanks for helping Trappist. I tried adding error visibility to my css page and used shift+F5 but still don't see anything. I tried searching on the word "error" on the page after refreshing, and I tried scanning the page, but no luck. The article in question is Climate change mitigation. I only see the error warning message if I click "edit" and then "preview". Can you take a look and see if the errors are obvious to you, and if so how you see them? Efbrazil (talk) 19:26, 3 April 2024 (UTC)Reply
That article shows an error at reference #279 (Cardenas): "{{cite book}}: |journal= ignored (help)". – Jonesey95 (talk) 19:28, 3 April 2024 (UTC)Reply
Thanks! Did you find that error by visually scanning the references for red text? Since there are hundreds of references that wasn't working for me.
As a side note, it's crazy to me that the error message at the top of the page doesn't link to the first instance of the error. Efbrazil (talk) 19:34, 3 April 2024 (UTC)Reply
I use CTRL+F and search for (help) to find error messages and cs1 to find maintenance messages.
The preview messages were originally designed and implemented to link to the first instance of the error. But, for technical reasons, we could not implement it in a way that didn't violate the html standard so you have to look for the messages.
Trappist the monk (talk) 19:41, 3 April 2024 (UTC)Reply
Thanks! Why not report the first reference number that fails in the error message? Once Jonesey95 said to look at reference 279 it was all straightforward. Efbrazil (talk) 19:46, 3 April 2024 (UTC)Reply
Because each template is processed independently and there is no mechanism to allow Lua modules to 'remember' stuff from a previous call.
Trappist the monk (talk) 21:41, 3 April 2024 (UTC)Reply
Then perhaps the error message could report the first 50 characters of the offending template? Then the user can then copy and paste that text to search the textarea window. So show something like this:
Script warning: A template that begins with "{{Cite book |author1=Garrett, L. |author2=Lévite, " has errors (help).
Alternatively, if the script knows what line number the template error is on it could report that. Just give the user something! Efbrazil (talk) 16:32, 4 April 2024 (UTC)Reply
Module:Citation/CS1 does not know the actual name of the template in the wikitext; the name could be the name of a redirect. The module does not get a wikitext representation of the template; could be written in vertical or horizontal format; whitespace may or may not exist around pipes (|), around parameter names, around the assignment operator (=), around parameter values so, for the purposes of CTRL+F searching:
{{cite book |author=Author |date=Date |title=Title |location=Location |publisher=Publisher}}
is not the same as:
{{cite book | author = Author | date = Date | title = Title | location = Location | publisher = Publisher }}
is not the same as:
{{cite book|author=Author|date=Date|title=Title|location=Location|publisher=Publisher}}
is not the same as:
{{cite book
|author=Author
|date=Date
|title=Title
|location=Location
|publisher=Publisher
}}
Module:Citation/CS1 does not know the position of the template within the wikitext so cannot provide a line number.
From a rendered citation with an error or maintenance message, you can hover over the title extlink, right click > Copy link address, and then paste that into the CTRL+F search window. Doesn't work for identifier links.
Trappist the monk (talk) 21:59, 4 April 2024 (UTC)Reply
Thanks! It's clear you know this system well. Could you write a section at the beginning of the CS1 errors page giving explicit step by step instructions on how to find the error on the page? Right now there's endless description on what can cause errors, but no instructions on how to find the location of the error. Efbrazil (talk) 16:29, 5 April 2024 (UTC)Reply

"|volume= has extra text": NO, please rewrite code! edit

Hi. Very often, the "volume" is more than a number, but the template is coded in a manner that doesn't allow for that and it leads to horrible red "admonishments" in the ref section. Example: a large work which has "volumes" split into several "parts", each bound separately, each with a title of their own, like "Volume V/Part 1: Galilaea and the North". So not a journal with "volume" plus "number", but a book. The template must accomodate for that, not force the editor to cut down the ref or twist their brain for improvised solutions - and in the end to give up the template altogether and write & format everything by themselves by hand. Already the language of this "help" page is so technical that I give up after a few sentences, and I'm quite familiar with science and, I wish to believe, far from functionally illiterate.

Please help, it's been a problem for far too long. I cannot code, but I know the principles and it can't be that much of a big deal. The same goes for all the template rigidities, which work like a Procrustean bed for (or actually against) the editor. Thank you! Arminden (talk) 15:32, 4 April 2024 (UTC)Reply

@Arminden: Hi there! It seems you were referring to a reference on the Qision article. I changed |volume=Volume V/Part 1 to |volume=V/Part 1 to remove the error. The error is only to say that you shouldn't start the |volume= parameter with the word "Volume" or an abbreviation of "Volume". You won't see an error if you use something like |volume=V/Part 1: Galilaea and the North. GoingBatty (talk) 17:45, 4 April 2024 (UTC)Reply
Thank you GoingBatty! It makes perfect sense (repetition). In other cases there's more guesswork needed, at some point you get enough of it. Usually I recheck my edits, if I see "vol.: Volume" I'm sure to remove the repetition. It's this pedantic way of coding for robots that kills mr, and presuming that your code got all possible options covered, which is obviously never the case. If they allowed a minimal wiggle room, we'd all have to gain from it.
Now we have "vol. V/Part 1", so I'll go back and change Part to lowercase, too. So double-checking & staying flexible is needed anyway.
Thanks again! Arminden (talk) 18:07, 4 April 2024 (UTC)Reply