Content deleted Content added
DocWatson42 (talk | contribs) m →Cite uses generic name: Alphabetized the list and performed other minor cleanup. |
last unsolicited fiddling sorry |
||
(37 intermediate revisions by 20 users not shown) | |||
Line 11:
=== Preview messages ===
When editors preview an article, MediaWiki displays a preview message box under the Preview header. When {{cs1}} and {{cs2}} templates have error or maintenance messages, [[Module:Citation/CS1]] summarizes those messages in the preview message box. Such a message box might look something like this:
<div style="margin-left:1.6em; display: block" class="
Script warning: {{color|#3a3|One or more {{mono|<nowiki>{{</nowiki>[[Template:cite book|cite book]]<nowiki>}}</nowiki>}} templates have maintenance messages}}; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).
Line 33:
(Note to new editors: those CSS pages are specific to you, and control your view of pages, by adding to your user account's [[CSS]] code. If you have not yet created such a page, then clicking one of the <code>.css</code> links above will yield a page that starts "Wikipedia does not have a [[user page]] with this exact name." Click the "Start the User:''username''/''filename'' page" link, paste the text below, save the page, follow the instructions at the bottom of the new page on bypassing your browser's cache, and finally, in order to see the previously hidden maintenance messages, refresh the page you were editing earlier.)
<syntaxhighlight lang="css">:root .mw-parser-output
To display hidden-by-default <span style="color:#d33">error messages</span>:
<syntaxhighlight lang="css">:root .mw-parser-output
Even with this CSS installed, older pages in Wikipedia's cache may not have been updated to show these error messages even though the page is listed in one of the tracking categories. A [[WP:NULLEDIT|null edit]] will resolve that issue.
After (error and/maintenance) messages are displayed, it might still not be easy to find them in a large article with a lot of citations. Messages can then be found by searching (with Ctrl-F) for "(help)" or "cs1".
To hide normally-displayed <span style="color:#d33">error messages</span>:
<syntaxhighlight lang="css">:root .mw-parser-output
You can personalize the display of these messages (such as changing the color), but you will need to ask someone who knows CSS or at [[WP:VPT|the technical village pump]] if you do not understand how.
Line 59 ⟶ 61:
::{{code|lang=css|.cs1-prop-foreign-lang-source {}|}} – subcategories of {{cl|CS1 foreign language sources}}
::{{code|lang=css|.cs1-prop-foreign-lang-source-2 {}|}} – {{cl|CS1 foreign language sources (ISO 639-2)}}
::{{code|lang=css|.cs1-prop-interwiki-linked-name {}|}} – author, contributor, editor, interviewer, translator name(s) linked to another language Wikipedia
::{{code|lang=css|.cs1-prop-interproj-linked-name {}|}} – author, contributor, editor, interviewer, translator name(s) linked to another MediaWiki project
::{{code|lang=css|.cs1-prop-___location-test {}|}} – {{cl|CS1 ___location test}}
::{{code|lang=css|.cs1-prop-long-vol {}|}} – {{cl|CS1: long volume value}}
::{{code|lang=css|.cs1-prop-script {}|}} – subcategories of {{cl|CS1 uses foreign language script}}
::{{code|lang=css|.cs1-prop-tracked-param {}|}} – subcategories of {{cl|CS1 tracked parameters}}
::{{code|lang=css|.cs1-prop-unfit {}|}} — {{cl|CS1: unfit URL}}
::{{code|lang=css|.cs1-prop-year-range-abbreviated {}|}} – {{cl|CS1: abbreviated year range}}
<section end="prop_cat_highlight_help_text" />
Line 68 ⟶ 73:
==Most common errors==
<!-- Items listed here with ~10k or more -->
* [[#
* [[#Cite <
* [[#Cite uses generic name]], ~
* [[#
* [[#Citation without a title of any form]], ~19k pages
* [[#Bare URL without a title]], ~11k pages
Line 185 ⟶ 191:
To resolve this error:
* use a more appropriate citation template (such as {{tl|cite book}} or {{tl|cite encyclopedia}}), or
* place the content of the {{para|chapter}} parameter in {{para|title}}, or
* for {{tl|cite news}}, {{para|department}} can be used to give the name of the newspaper's section, such as "Obituaries", or
Line 326 ⟶ 332:
* misplaced, incorrect, or extraneous punctuation
* misplaced, incorrect, or extraneous spacing
* extra or missing zeros, such as June 06 instead of June 6
* extraneous text
* hyphens or slashes instead of en dashes in date ranges (en dashes are required)
* misspelling or improper capitalization (see [[MOS:ALLCAPS]] for more detail that is not in [[MOS:DATEFORMAT|Wikipedia Manual of Style's guidance on dates]])
Line 459 ⟶ 466:
* If the ISBN as printed in your source is refusing to validate, '''do''' check both the front matter and the book cover for ISBNs. It is not uncommon for the ISBN to be misprinted in the front matter but correct on the cover.
* '''Do''' preview your edit and check that the new ISBN does now link to the correct source.
* Bad ISBNs are a [[Wikipedia:Signs_of_AI_writing#Invalid DOI and ISBNs|possible indicator of LLM-generated text]]. '''Do''' consider reviewing the surrounding text, the entire article, or recent edits to that article for AI [[Hallucination (artificial intelligence)|hallucinations]] and [[Wikipedia:Signs_of_AI_writing|other hallmarks of LLM generation]].
In very rare cases, publishers have released books with malformed ISBNs. If you are certain that a non-conforming ISBN truly corresponds to the published work, then you can add [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]] around the identifier to suppress the error message. In many cases, books may have been reissued with a corrected ISBN. Use a corrected ISBN when possible.
Line 769 ⟶ 777:
Some URL domains are written with non-Latin characters. cs1|2 does not accept those kinds of URLs so they must be '[[Internationalized ___domain name|internationalized]]'. Online tools are available to internationalize URLs that are written in non-Latin scripts:
* {{cite web |url=https://www.verisign.com/en_US/channel-resources/___domain-registry-products/idn/idn-conversion-tool/index.xhtml?loc=en_US |title=IDN Conversion Tool |website=Verisign }} Only enter the ___domain in the tool and not the full url.
Top- and second-level ___domain names are checked for proper form. Generally, top-level ___domain names must be two or more letters; second-level ___domain names must be two or more letters, digits, or hyphens (first and last character must be a letter or digit). [[Single-letter second-level ___domain]]s are supported for:
Line 804 ⟶ 812:
This error message highlights CS1|2 templates that hold empty parameters with names that are not known to a given CS1|2 template. This error message is a companion to [[Help:CS1 errors#parameter_ignored|Unknown parameter {{pipe}}xxxx= ignored]].
Empty positional parameters, which typically look like two adjacent pipes in a template, <code><nowiki>| |</nowiki></code>, or a pipe and then the end of the template, <code><nowiki>|}}</nowiki></code>, are identified as numbered parameters: {{error-small|{{para|1|plain=yes}}}}. Similarly, a pipe followed by an HTML comment that encloses everything before the next pipe or closing brace, <code>| <!--<{{var|param name/value pair}}>--> |</code> will be identified as an empty numbered parameter. Parameters that have both a pipe and an equal sign but do not have a name are identified as empty-string parameters: <code>|=</code> or <code>| =</code> → {{error-small|{{para|(empty string)|plain=yes}}}}. Various templates that wrap CS1|2 templates may cause this error when they use constructs like this: <
To resolve this error:
Line 857 ⟶ 865:
! style="width: 6em;" | Date
|-
|
|}<section end="deprecated_params_table" /><section end="deprecated_params_help_text" /><section begin="deleted_params_table" />
<!-- Support for the following parameter aliases was recently removed. Usage in mainspace should be about zero, and hints for them added to the suggestion list. However, as they may occasionally pop up again through copy&paste or usage of old scripts for some while, list them here as well for users coming here searching for help. -->
Line 867 ⟶ 875:
| -->
|-
| {{para|
| {{para|last{{var|n}}}} / {{para|first{{var|n}}}}, {{para|author{{var|n}}}}, {{para|vauthors}}
▲|-
|}<section end="deleted_params_table" />
Line 926 ⟶ 924:
* Replace {{para|author|Smith, Jane, editor}} with {{para|editor|Smith, Jane}}
False positives are possible. When the name is valid, wrap the parameter value in the [[Help:Citation_Style_1#Accept-this-as-written_markup|accept-this-as-written markup]]:
Line 1,092 ⟶ 1,089:
* for {{para|chapter}}, the URL may belong in {{para|chapter-url}}.
* for other parameters, it may belong in {{para|url}}.
Wrapping the parameter value in double parentheses (i.e. "accept as written" markup) does not work around this error message.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_param_has_ext_link|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="param_has_ext_link_help_text" />
Line 1,205 ⟶ 1,204:
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_script_parameter|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="script_parameter_help_text" />
==<span id="invalid_isbn_date">ISBN / Date incompatibility</span>==
<section begin="invalid_isbn_date_help_text" />{{help desk}}
{{#invoke:Cs1 documentation support|help_text_error_messages|err_invalid_isbn_date}} – this error message hidden by default
[[ISBN]]s were created c. 1965. Books published before that date will not have been issued an ISBN. However, reissues of pre-ISBN publications <em>are</em> issued ISBNs, even barring the publication of a new edition. Consider double-checking whether the ISBN is valid before removing it.
To resolve this error:
* Remove the ISBN when citing a source published before 1965.
** If the cited edition or reissue of the book was published after 1965, ensure that {{para|date}} or {{para|year}} has the correct publication year. The reissue date is typically available by querying [[WorldCat]] with the reissue's ISBN. Adding {{para|orig-date}} may be appropriate in such cases; e.g., {{para|orig-date|1st Pub. 1929}}.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_invalid_isbn_date|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="invalid_isbn_date_help_text" />
==<span id="extra_text_issue">|issue=/|number= has extra text</span>==
Line 1,389 ⟶ 1,400:
<section begin="param_access_requires_param_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_access_requires_param|$1=<param>|$2=<param>}}
This error is reported when an [[Help:Citation Style 1#Registration or subscription required|access level]] has been specified for some external link, but the corresponding required parameter is missing or empty.
The parameter can be one of
{| class="wikitable"
Line 1,536 ⟶ 1,547:
: Latin Extended-A<ref>{{cite web |title=Latin Extended-A |website=Unicode |url=https://www.unicode.org/charts/PDF/U0100.pdf |access-date=2015-04-19}}</ref> (0100–017F)
: Latin Extended-B<ref>{{cite web |title=Latin Extended-B |website=Unicode |url=https://www.unicode.org/charts/PDF/U0180.pdf |access-date=2015-04-19}}</ref> (0180–01BF, 01C4–024F)
: Latin Extended Additional<ref>{{cite web |title=Latin Extended Additional |website=Unicode |url=https://www.unicode.org/charts/PDF/U1E00.pdf |access-date=2025-06-02}}</ref> (1E00–1EFF)
This error is also reported when more than two initials are used: in case of more than two initials, list only the first two.
Line 1,571 ⟶ 1,583:
To resolve this error, remove the extraneous text from the parameter value.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_extra_text_volume|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="extra_text_volume_help_text
==<span id="param_has_twl_url">Wikipedia Library link in <param></span>==
<section begin="twl_url_help_text" />{{help desk}}{{#invoke:Cs1 documentation support|help_text_error_messages|err_param_has_twl_url|$1=<{{var|param}}>}}
This error is reported when a URL-holding parameter has a URL that links to [[Wikipedia:The Wikipedia Library|The Wikipedia Library]]. These urls include this text:
:<code>wikipedialibrary.idm.oclc.org</code>
When these sorts of URLs are encountered, [[Module:Citation/CS1]] emits this error message and automatically sets {{para|url-access|subscription}} because these URLs are not accessible by readers.
To resolve this error, make sure that the value assigned to the URL parameter is {{em|not}} the Wikipedia Library URL but {{em|is}} the URL of the source.
Pages with this error are automatically placed in {{#invoke:cs1 documentation support|help_text_cats|err_param_has_twl_url|pages=yes}}.<ref group="lower-alpha" name="categories" /><section end="twl_url_help_text" />
==<span id="module_cite">#invoke:Cite errors</span>==
<section begin="module_cite_help_text" />{{help desk}}
{{hatnote|These error messages are emitted by [[Module:Cite]], a helper module for [[Module:Citation/CS1]] that may be used to replace cs1{{!}}2 templates in articles that have or will exceed the [[Help:Template limits#Post-expand include size|Post-expand include size]] limit.}}
<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles><span class="citation-comment" style="color:#d33; font-size:120%">missing template name as first positional parameter</span>
[[Module:Cite]] requires as its first positional parameter the canonical name of one of the cs1 templates (without the <code>cite</code> prefix) or the name of the cs2 template (<code>citation</code>). The module emits this error message when the first positional parameter is missing or empty.
<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles><span class="citation-comment" style="color:#d33; font-size:120%">unknown template name: <{{var|template name}}></span>
The module emits this error message when the first positional parameter is not the canonical name of a recognized cs1|2 template.
To resolve either of these errors, make sure that the module call has one of these canonical template names as its first positional parameter value:
{{div col|colwidth=20em}}
*<code>arxiv</code>
*<code>av media</code>
*<code>av media notes</code>
*<code>biorxiv</code>
*<code>book</code>
*<code>citation</code>
*<code>citeseerx</code>
*<code>conference</code>
*<code>document</code>
*<code>encyclopedia</code>
*<code>episode</code>
*<code>interview</code>
*<code>journal</code>
*<code>magazine</code>
*<code>mailing list</code>
*<code>map</code>
*<code>medrxiv</code>
*<code>news</code>
*<code>newsgroup</code>
*<code>podcast</code>
*<code>press release</code>
*<code>report</code>
*<code>serial</code>
*<code>sign</code>
*<code>speech</code>
*<code>ssrn</code>
*<code>tech report</code>
*<code>thesis</code>
*<code>web</code>
{{div col end}}
Pages with this error are automatically placed in {{#ifeq:{{FULLPAGENAME}}|Category:CS1 errors: cite module|Category:CS1 errors: cite module|[[:Category:CS1 errors: cite module]]}} ({{PAGESINCATEGORY:CS1 errors: cite module}} pages).<ref group="lower-alpha" name="categories" /><section end="module_cite_help_text" /><!--When moving this section keep the following attached to the Notes section below --><section begin="notes_help_text" />
==Notes==
<!-- When moving this section keep <section begin="notes_help_text"> (located above this section header) attacted -->
|