This category holds articles that use any of the short-cite templates ({{harv}} and{{sfn}} template families, and{{harvc}}) where one or more of those short-cite templates do not properly link to a full citation, the target, or where multiple full cites can be the target of a single short-cite template.
Due totechnical limitations,Category:Harv and Sfn no-target errors contains many articles withfalse-positive errors.No-target error messages are hidden by default. Articles with multiple-target errors are listed inCategory:Harv and Sfn multiple-target errors. Multiple-target errors are not susceptible to false-positive errors so those errors are not suppressed.Several options to view error messages are detailed below, as well as possible ways toresolve errors.
Currently, twouser scripts relatively reliably detect errors
as well as a third experimental method based on customizing a.css page. The three methods are
importScript('User:Svick/HarvErrors.js');// Backlink: [[User:Svick/HarvErrors.js]]importScript('User:Trappist the monk/HarvErrors.js');// Backlink: [[User:Trappist the monk/HarvErrors.js]].harv-error{display:inline!important;}/* display Module:Footnotes errors */If short-cite template error messages areenabled, editors can see these messages:
|ref=nonecite orcita – these two forms cover most of the cs1|2 redirects|date=2020a,|date=2020bSimilar (although not identical) messages are emitted by theuser scripts. See the script documentation.
Ways of resolving legitimateno target errors include:
cite orcita to the target of the redirect (e.g. change{{encyclopedia}} to{{cite encyclopedia}}){{cite ...}} redirects for citation wrapper templates:{{<whatever>}} →{{cite <whatever>}}. Consider renaming the wrapper template so that its canonical name is{{cite <whatever>}} because there are automated processes out there that rename redirects to their canonical names; once renamed by these drones, false-positive error messaging may reappear.|ref= or|id= as appropriate to match the value expected by the short-cite template{{anchor}} parameter value to the value expected by the short-cite template|ref=none to suppress anchor ID link creationWays of resolving false positiveno target errors include:
{{sfn whitelist}} template in the articleWays of resolvingmultiple targets errors include:
|ref=none to cs1|2 templates|date= and to the{{sfn}} template when there are multiple full citations to works in the same year by identical authors or editorsNo advice is given for resolvingfalse-positive errors.
When a short-cite template links to a full citation that is rendered by a template that wraps a CS1 template, like{{cite DNB}} (which wraps{{cite encyclopedia}}), ano target error may be displayed even when the short-cite template is valid and the link works. That is a "false positive" error. If you find what looks like a false positive error, please report it on the talk page for this category, and another editor will either fix the article or add the template in question toModule:Footnotes/whitelist.
The short-cite templates employ an article reader to read the article's raw wikitext (the same text that you see in the source editor's edit window). While reading the wikitext, the article reader looks for a variety of templates that can create anchor IDs. For each such template found, the article reader attempts to extract the necessary information to determine the template's anchor ID, if it produces one. For cs1|2, the most common long-form citation templates, the article reader looks for:
|ref={{sfnref}}: the anchor ID generated by{{sfnref}} (or its redirect{{harvid}})|ref=<plain text>: the anchor ID is the<plain text>The article reader extracts similar information from other templates as appropriate for those templates.
Each long-form citation anchor ID is saved in a list along with a tally indicating how many of that ID the article reader found. When the short-cite template renders its output, it looks for its target anchor ID in the anchor-ID list:
Theno target errors may be true errors or may befalse-positive errors. For true errors, there is no anchor ID in the article to match the anchor ID expected by the short-cite template. A false-positive error occurs because the article reader can only read the article's raw wikitext, it cannot burrow into wrapper templates. Wrapper templates enclose the template that creates the anchor ID. This enclosure hides the necessary details, so the article reader cannot determine that wrapper template's anchor ID. For example,{{cite DNB}} is a wrapper template that encloses{{cite encyclopedia}}. The values assigned to the{{cite DNB}} parameters|year= and|supplement= tell{{Cite DNB}} how to set editor names and date in its call to the enclosed{{cite encyclopedia}}, which uses them to create the wrapper template's anchor ID. When a wrapped template creates a matching anchor ID that the article reader cannot see; the link from short-cite to long-form citation works but is marked with ano target false-positive error message.
This category has the following 2 subcategories, out of 2 total.