Help:Cite errors

The TechInfoDepot footnotes system has the ability to detect errors. This page documents the error messages and provides an understanding of the problem and solutions.

Overview
Cite.php is the software extension for the footnotes system. Two HTML-style tags are used to define and show the references.

 Single use footnotes are defined by enclosing content within :
 * content

A footnote used multiple times may be defined with a name:
 * content

To invoke a named footnote:
 * 

Footnotes may be defined in groups:
 * content

 To display the reference list, after all of the  tags, include:

To display a list of references defined in a group, include:
 * 

Templates
Several templates have been developed for use with references:
 * Reflist adds the tag with some formatting options
 * R invokes up to five named references
 * Sfn invokes named references for shortened footnotes

Error messages
The messages will be formatted as an error.

These messages are dependent on the language setting in Special:Preferences— this list applies only to "en — English."

Other problems
Some problems may not show a cite error message, while others may not be obvious.

A page shows in the reference error category, but no cite errors show
If  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 &amp;#61;

refTools should catch this problem.

For example, an incorrectly nested reference where lower is being used to make the reference smaller:

Reference links show in the body of the article, but do not show in the reference list
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 name="foo">content2

Only content1 will show. refTools will catch this problem.

Content on a non-article page is missing
If a footnote does not have a closing, 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 tag, generating an error, but the message for a missing  tag is suppressed on non-article pages. refTools will catch this problem.

Templates
Some templates may include </ref> tags; for example botanist. If a template of this type in included without the 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 only one of these is required, not all of them.

Method 1

If the template has a documentation page, add there.

Method 2

Add the following code to the end of the template:

Method 3

Add the following code to the end of the template: parameter. See Help 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.

Tools
refTools can be enabled via. It includes an error checking tool for common problems.

Messages, namespaces and categories
Internal messages are generated by the Cite.php extension and shown as a MediaWiki message. See the parser hooks section of Special:Version for the installed version of Cite.php. 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 for the main namespace and by τ for template, category, help and file namespaces.

Bugs

 * : Misleading error message for omitted s; this is the issue with the last missing or malformed
 * : When nesting refs using cite.php extension, the ordering is wrong
 * : Nested refs fail inside references block
 * : A cite error message may display in the wrong language. This can be resolved by purging the page