This is aninformation page. It is not anencyclopedic article, nor one ofWikipedia's policies or guidelines; rather, its purpose is to explain certain aspects of Wikipedia's norms, customs, technicalities, or practices. It may reflect differing levels ofconsensus andvetting. |
The MediaWiki software'sCite extension, used by Wikipedia, has the ability to detect errors. This page documents the error messages and provides an understanding of the problems and solutions.
The messages will be formatted asan error, and are visible on the rendered page after hitting the "Publish changes" button.
These messages are dependent on the language setting inSpecial:Preferences—this list applies only to "en - English".
<ref> tags on this page without content in them (see thehelp page).<ref> tag is malformed or has a bad name (see thehelp page).<ref> tag; supported parameters are $2 (see thehelp page).<ref> tag name cannot be a simple integer (see thehelp page).<ref> tag is missing the closing</ref> (see thehelp page).$1 was invoked but never defined (see thehelp page).{{reflist}} template with thegroup parameter (see thehelp page).<ref group=$1> tags on this page, but the references will not show without a{{reflist|group=$1}} template (see thehelp page)."$1" (see thehelp page).<references> tag (see thehelp page).The following error messages in the Cite extension currently have no help pages because they occur infrequently or were recently added:
<ref follow="…"> tag that is the continuation of a previous one cannot be named individually or have details.dir="$1", must beltr orrtl<ref> tags with the name "$1" does have a conflicting dir attribute.<ref> tag; missing name attribute. A name attribute must be provided along with a details attribute.<references><ref> tag with details must contain content or point to a parent reference by name.<ref> tag with name "$1" cannot use details when inside<references>.<ref> tag. Did you mean "$2"?Some problems may not show a cite error message, while others may not be obvious.
When you cite the same source more than once on a page, use only straight quotation marks" " to enclose the reference name. Do not use curly quotation marks“ ”, which are treated as simply another character, not as quotation marks. An error message will appear if the original and repeat references use a mix of straight and curly quotation marks.The syntax to define a named reference is:
<ref name="name">content</ref>To repeat the named reference:
<ref name="name" />If<ref>...</ref> includes a URL with an =, and if the reference is inside a template, then the template will fail. Depending on the placement of the URL, the cite error message may not display, but the page will be included in the error category. Ensure that = are encoded as =
refTools should catch this problem.
For example, an incorrectly nested reference where{{lower}} is being used to make the reference smaller:
{{lower|<ref>content1<ref>content2</ref>[http://www.washingtoninstitute.org/templateC05.php?CID=2386]</ref>}}
This may be caused by a template that is not properly closed with }}.
It can also be caused by multiple footnotes that are defined to use the same name. Links will be generated for both, but only the first will show in the references list: For example:
<ref name="foo">content1</ref><ref name="foo">content2</ref>Onlycontent1 will show. refTools will catch this problem.
If a footnote does not have a closing</ref>, it will "eat" the following text, causing it to not show. This normally shows a cite error, unless it is the last footnote on the page. Normally, this would then suppress the<references /> tag, generating an error, but the message for a missing<references /> tag is suppressed on non-article pages. refTools will catch this problem.
Some templates may include<ref>...</ref> tags; for example{{botanist}}. If a template of this type is included without the<references /> tag, then an error is generated, but the problem is not obvious. refTools will not catch this problem.
Several methods are available for solving this problem. Below they are listed in order of preference. Note that onlyone of these is required, not all of them.
If the template has adocumentation page, add<references /> there.
Add the following code to the end of the template:
<noinclude>{{Template reference list}}</noinclude>
Add the following code to the end of the template:
<noinclude><divstyle="display: none"><references/></div></noinclude>
Cons: Hides the references, not informing the user that it is there; editors won't be able to check the references formatting.
Include the<references /> tag within the template itself using thegroup parameter. SeeHelp talk:Cite errors/Testcases1 for an example.
Cons: Creates a separate references section that may not be obvious; does not allow reuse of the references within the body of the article.
refTools can be enabled viaPreferences →Editing → Usability features. It includes an error checking tool for common problems.
Internal messages are generated by theCite extension and shown as a MediaWiki message. See the parser hooks section ofSpecial:Version for the installed version of Cite. These messages are in the MediaWiki namespace and can be modified only by admins.
The MediaWiki messages use{{broken ref}} to control the namespace and category. Messages show only on main (article), user, template, category, help and file pages. Talk pages do not show error messages.
Category default sorting is by {{PAGENAME}} for the main namespace and by τ{{PAGENAME}} for template, category, help and file namespaces.