Jump to content

Help:CS1 errors

Page semi-protected
From Wikipedia, the free encyclopedia

Skip to top
Skip to bottom

This page describes the error messages reported by the Citation Style 1 and Citation Style 2 citations, what they mean, and how editors might resolve the errors. Category:CS1 errors is the general errors category and Category:CS1 maintenance is the general maintenance category.

Errors issued by Wikipedia's <ref> system, in which citation templates are typically embedded, can be found at Help:Cite errors.

Controlling error message display

Preview messages

When editors preview an article, MediaWiki displays a preview message box under the Preview header. When Citation Style 1 and Citation Style 2 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:

This is only a preview; your changes have not yet been saved! → Go to editing area

Script warning: {{cite book}}: this reference has maintenance messages; messages may be hidden (help).

Script warning: {{cite journal}}: this reference has errors; messages may be hidden (help).

The summary messages have three components:

  1. 'Script warning: ' – this prefix is provided by MediaWiki;
  2. a colored (green maintenance or red error) message that identifies the type of template that has a message with a link to that template's documentation; wrapper templates with messages will show the name of the wrapped template, and;
  3. 'messages may be hidden' – the message suffix with a help link to this page.

Preview messages in the preview message box cannot be hidden. The preview message suffix 'messages may be hidden' means that the template's message(s) may not be visible. To learn how to show or hide template messages, see the next section (§ Error and maintenance messages).

Error and maintenance messages

By default, Citation Style 1 and Citation Style 2 error messages are visible to all readers and maintenance messages are hidden from all readers.

To display maintenance messages in the rendered article, include the following text in your common CSS page (common.css) or your specific skin's CSS page and (skin.css).

(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 .css 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.)

:root .mw-parser-output .cs1-maint {display: inline;} /* display Citation Style 1 maintenance messages */

To display hidden-by-default error messages:

:root .mw-parser-output .cs1-hidden-error {display: inline;} /* display hidden Citation Style 1 error messages */

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 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 error messages:

:root .mw-parser-output .cs1-visible-error {display: none;} /* hide Citation Style 1 error messages */

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 the technical village pump if you do not understand how.

Nota bene: these CSS rules are not obeyed by Navigation popups. They also do not hide script warning messages in the Preview box that begin with "This is only a preview; your changes have not yet been saved".

Properties category highlighting

Module:Citation/CS1 adds properties categories to some CS1|2 citations. Unlike errors or maintenance needs, there is no message when a properties category is added. Properties categories may be temporary or may be perpetual. Editors can use CSS to add special styling to CS1|2 template renderings that will highlight a citation that added a properties category. For example, this template uses a long volume name:

{{cite book |title=Title |date=May–Jun 2021 |volume = 1: Long volume}}
Title. Vol. 1: Long volume. May–Jun 2021.

If you add this to your CSS that citation will render with a pale yellow background:

.cs1-prop-long-vol {background: #FFC;}

Add one or more of these (with appropriate styling) to your CSS to highlight template renderings when those templates add the associated properties category:

.cs1-prop-foreign-lang-source {} – subcategories of Category:CS1 foreign language sources
.cs1-prop-foreign-lang-source-2 {}Category:CS1 foreign language sources (ISO 639-2)
.cs1-prop-interwiki-linked-name {} – author, contributor, editor, interviewer, translator name(s) linked to another language Wikipedia
.cs1-prop-interproj-linked-name {} – author, contributor, editor, interviewer, translator name(s) linked to another MediaWiki project
.cs1-prop-location-test {}Category:CS1 location test‎
.cs1-prop-long-vol {}Category:CS1: long volume value
.cs1-prop-script {} – subcategories of Category:CS1 uses foreign language script‎
.cs1-prop-tracked-param {} – subcategories of Category:CS1 tracked parameters
.cs1-prop-unfit {}Category:CS1: unfit URL
.cs1-prop-year-range-abbreviated {}Category:CS1: abbreviated year range‎

Most common errors

This is a list of the ten most-populated cs1|2 error categories ordered by page count.

|access-date= requires |url=

|access-date= requires |url=

The |access-date= is the date that the online resource addressed by |url= was added to the article. If |access-date= has been included in the citation without |url= then this message appears. If the citation does not use a web link, then |access-date= is redundant and should be removed.

When the online resource has a publication or other fixed date associated with it, |access-date= is of limited value though may be useful in identifying an appropriate archived version of the resource. Without |url=, |access-date= is not considered useful.

To resolve this error, provide a value for |url= or remove |access-date=. Editors should try to determine why the citation has |access-date= without |url=. For example, the citation may never have had a |url=, or |url= may have been removed because it links to a site that violates the creator's copyright (see WP:COPYLINK), or because |url= was deemed to be dead. If the citation never had |url= or it was removed for copyright violations, remove |access-date=. When a dead |url= has been removed, restore the |url= and if possible repair it (see WP:LINKROT).

Pages with this error are automatically placed in Category:CS1 errors: access-date without URL (7,726 pages).[a]

|archive-date= / |archive-url= timestamp mismatch

|archive-date= / |archive-url= timestamp mismatch; $1 suggested

Archive.org URLs have a 14-digit snapshot timestamp. This error message is displayed when the archive snapshot date is not the same as the date stated in |archive-date=.

To resolve this error, make sure that |archive-url= and |archive-date= refer to the same snapshot. This could mean that values assigned to either or both parameters need to be updated. To get the correct |archive-date= value, view the archived page's source, looking for a line near the bottom that starts with "FILE ARCHIVED ON". The archive date should appear on that line.

Pages with this error are automatically placed in Category:CS1 errors: archive-url (343 pages).[a]

Pages with this error in the tracking category can be fixed by the bot WP:WAYBACKMEDIC. Requests to run the bot can be made at WP:URLREQ.

|archive-date= requires |archive-url=

|archive-date= requires |archive-url=

|archive-date=, identifies the date that the web resource was archived. Without a matching |archive-url= parameter, |archive-date= is meaningless.

To resolve this error, provide a value for |archive-url= or remove |archive-date=

Pages with this error are automatically placed in Category:CS1 errors: archive-url (343 pages).[a]

|archive-url= is malformed

|archive-url= is malformed: <reason>

Archive.org allows a variety of URLs to access snapshots of an archived page. Some of these are:

https://web.archive.org/web/YYYYMMDDhhmmss/http://www.example.com – a single snapshot; this is the preferred form for use with |archive-url=
https://web.archive.org/web/*/http://www.example.com – a wildcard search results page; useful for locating an appropriate snapshot but not appropriate in a citation
https://web.archive.org/web/201603/http://www.example.com – incomplete timestamp; archive.org returns the most recent snapshot
https://web.archive.org/save/http://www.example.com – saves a new snapshot of the current target; do not use this form

There are two forms of the basic URL:

https://web.archive.org/<timestamp>/... – the old form
https://web.archive.org/web/<timestamp><flags>/... – the new form

The error message identifies the reason for the message. The reasons are:

save command – the archive.org URL is the save command
pathweb/ was expected but something else was found
timestamp – the timestamp portion of the URL path is:
  • not 14 digits
  • not a valid date (time portion of the timestamp is not checked):
    • year farther into the future than next year
    • year is earlier than archiver launch date of 1996 for archive.org
    • month is not in the range [01–12]
    • day is not in the range [01 – [28|29|30|31]] (as appropriate for the year and month)
flag – the flag portion of the URL path (if present; new form URLs only) is not 2 lowercase letters followed by an underscore: 'id_'
livewebliveweb.archive.org is a deprecated form of the domain name

When the archive.org URL has any of these errors, Module:Citation/CS1 does not link to archive.org in normal article view and emits an appropriate error message.

However, in article preview mode, the module creates a modified link to archive.org that uses a partial timestamp with * wildcard suffix. This new URL links to an archive.org calendar view so that editors may more easily select a suitable archived snapshot from those available at archive.org to fix the malformed |archive-url= link. (If no snapshots have been archived at archive.org, and the cited page is still live, this link also allows editors to save the first snapshot of the page at archive.org.)

To resolve this error, choose the URL of an appropriate snapshot from those held at archive.org. Search for the target URL at archive.org.

Pages with this error are automatically placed in Category:CS1 errors: archive-url (343 pages).[a]

|archive-url= requires |archive-date=

|archive-url= requires |archive-date=

|archive-date=, identifies the date that the web resource was archived.

To resolve this error, provide a value for |archive-date= (see acceptable date formats in MOS:DATEFORMAT). For web resources archived at archive.org,[1] the archival date can be found in the |archive-url=; for resources archived at webcitation.org,[2] the cache date is included in the archive header.

Pages with this error are automatically placed in Category:CS1 errors: archive-url (343 pages).[a]

|archive-url= requires |url=

|archive-url= requires |url=

A properly formatted citation that includes |archive-url= and |archive-date= requires |url=. When the citation includes |url-status=live, the ordering of elements in the rendered citation is changed to put the original URL first.

To resolve this error, provide a value for |url=. For web resources archived at archive.org,[1] the original URL can be found in the |archive-url= value; for resources archived at webcitation.org,[2] the original URL is included in the archive header.

Pages with this error are automatically placed in Category:CS1 errors: archive-url (343 pages).[a]

|arxiv= required

|arxiv= required

{{cite arXiv}} requires one, but not both, of the identifier parameters |arxiv= or |eprint= to specify an arXiv identifier.

To resolve this error, ensure that the template has |arxiv= or |eprint= with a properly constructed value.

Pages with this error are automatically placed in Category:CS1 errors: arXiv (0 pages).[a]

|asin-tld= requires |asin=

|asin-tld= requires |asin=

When |asin-tld= is used in a CS1|2 template, |asin= (with value) must also be present.

To resolve this error, either add the missing ASIN or remove the 'broken' parameter.

Pages with this error are automatically placed in Category:CS1 errors: ASIN TLD (0 pages).[a]

|biorxiv= required

|biorxiv= required

{{cite bioRxiv}} requires the identifier parameter |biorxiv=.

To resolve this error, ensure that the template has |biorxiv= with a properly constructed value.

Pages with this error are automatically placed in Category:CS1 errors: bioRxiv (0 pages).[a]

|chapter= ignored

|chapter= ignored

Citation Style 1 templates {{cite web}}, {{cite news}}, {{cite journal}}, {{cite magazine}}, {{cite press release}}, {{cite podcast}}, {{cite newsgroup}}, as well as template {{citation}} when it uses |work= or any of its aliases, do not support |chapter= and its components |trans-chapter=, |script-chapter=, |chapter-url=, and |chapter-format=. The alias parameters |contribution=, |entry=, |article=, |section=, and their components, are similarly not supported.

To resolve this error:

  • use a more appropriate citation template (such as {{cite book}} or {{cite encyclopedia}}), or
  • place the content of the |chapter= parameter in |title=, or
  • for {{cite news}}, |department= can be used to give the name of the newspaper's section, such as "Obituaries", or
  • for {{citation}}, remove |work= or its aliases such as |website= and place their content in |title= if appropriate
  • move the content of the |chapter= parameter out of the template, before the closing </ref>

Pages with this error are automatically placed in Category:CS1 errors: chapter ignored (1 page).[a]

<char> character in |<param>= at position n

<char> character in |<param>= at position n

This error is reported for citations with parameter values that contain invisible or non-printable characters known as control characters; the error includes the position at which the character can be found. Module:Citation/CS1 detects parameter values that contain any of these characters:

To resolve invisible-character errors, remove or replace the identified character. Most intentional white-space characters should be replaced with a normal space character (i.e. press your keyboard's space bar). See MOS:NBSP for guidance on insertion of intentional non-breaking spaces.

Because these characters are mostly invisible, the error message identifies the character's position in the parameter value counted from the left. Space characters between the assignment operator (the '=' sign) and the parameter value are not counted. If you move through the citation with the arrow keys then the cursor may stand still once at an invisible character, which can be removed with Delete or ← Backspace. If you copy-paste a string to the "Characters" field at https://r12a.github.io/app-conversion/ and click "View in UniView" then the position and name of all characters is shown.

Zero-width joiner characters (U+200D) are used as a valid part of emoji modification (for example, adding a skull emoji to a flag emoji to create a pirate flag emoji). When new modifiers are added to the emoji character set, which happens one or two times per year, those modifiers need to be added to the Citation Style 1 "Configuration" module. Editors can request this addition at Help talk:Citation Style 1.

<name> stripmarker in |<param>= at position n

Strip markers are special sequences of characters that MediaWiki inserts as a place-holder for certain XML-like tags. These tags include <gallery>...</gallery>, <math>...</math>, <nowiki>...</nowiki>, <pre>...</pre>, and <ref>...</ref>. The strip markers are replaced with content before the final page rendering. The module ignores math and nowiki strip markers.

To resolve strip marker errors, remove or replace the identified tag. The error message identifies the strip marker's position in the parameter value counted from the left. Space characters between the assignment operator (the '=' sign) and the parameter value are not counted when calculating the position.

Strip marker errors can also be caused by unsupported additional text or templates in parameter valuesfor example, {{ISBN}} in |title=. Resolve the problem by moving the extraneous text outside the citation template, or by removing the extraneous text or template markup, as appropriate.

Pages with this error are automatically placed in Category:CS1 errors: invisible characters (145 pages).[a]

Check |arxiv= value

Check |arxiv= value

When Citation Style 1 and Citation Style 2 templates contain |arxiv=, a test is done to see if the arXiv identifier conforms with the arXiv identifier scheme.[3] The identifier is checked for a valid number of digits in the article id; valid year and month values; and properly-placed hyphens, slashes, and dots.

To resolve this error, ensure that the |arxiv= value is correct.

Pages with this error are automatically placed in Category:CS1 errors: arXiv (0 pages).[a]

Check |asin= value

Check |asin= value

When Citation Style 1 and Citation Style 2 templates contain |asin=, a test is done to see if the ASIN identifier contains ten upper-case alphanumeric characters without punctuation or spaces and that if the first character is numeric, that the ASIN conforms to the rules for a ten-digit ISBN.

To resolve this error, ensure that the |asin= value is correct.

If the |asin= value is correct and all-numeric, use |isbn= instead and delete any |asin-tld= parameters.

Pages with this error are automatically placed in Category:CS1 errors: ASIN (1 page).[a]

Check |asin-tld= value

Check |asin-tld= value

Citation Style 1 and Citation Style 2 templates contain a test for known |asin-tld= values to specify the top-level domain (TLD) of a given ASIN identifier link. The list of currently supported values is:

ae, au, br, ca, cn, de, es, fr, in, it, jp, mx, nl, pl, sa, se, sg, tr, uk

It is not necessary to provide |asin-tld= to specify the default (United States). If you want to specify this condition explicitly, a pseudo-value of us can be given to denote this.

All these values are automatically resolved to the correct TLD following one of the schemes nn, com.nn, co.nn, z.nn, and com.

If an unsupported value is encountered, the template will issue this error message.

To resolve this error, ensure that the |asin-tld= value is correct.

If the value is correct, please report this at Help talk:Citation Style 1, so that it can be added to the list of supported values.

Pages with this error are automatically placed in Category:CS1 errors: ASIN TLD (0 pages).[a]

Check |bibcode= <message>

Check |bibcode= <message>

When Citation Style 1 and Citation Style 2 templates contain |bibcode=, a test is done to see if the bibcode identifier has the proper format.[4] Bibcodes are expected to match these requirements:

length must be 19 characters (<message> = 'length')
characters in position(s): (except as specified otherwise, violations produce 'value' in the <message> portion of the error message):
1–4 must be digits and must represent a year in the range of 1000 – next year (<message> = 'year')
5 must be a letter
6–8 must be letter, digit, ampersand, or dot (ampersand cannot directly precede a dot; &. (<message> = 'journal'))
9–18 must be letter, digit, or dot
19 must be a letter or dot

To resolve this error, ensure that the