Help:Cite errors/Cite error references duplicate key
This page will help you to fix the cite error message:
The named reference "$1" was defined multiple times with different content (see the help page).
- If you have read this help page and find something missing or confusing, please discuss it at the main talk page.
- Please reference this page and the page where you have the problem so we can understand your issues.
- For basic information on the footnotes system, see Referencing for beginners; for advanced help, see Footnotes.
Sfn
If two or more calls to {{sfn}} use the same citation parameters, that is, if the author(s), year, and page number(s) are all identical, but there is some other difference, such as a use of pp= vs p=, or a use of ps= in one but not the other, this issue will arise.
The solution is to make the calls identical. If the ps= parameter was being used to include a quote or other extended content, use {{harvnb}} inside a <ref>...</ref>
construct with the quote after the template but inside the ref tag structure.
Nested footnotes
If there are nested footnotes, i.e. a reference within another reference, then the error can occur even if two definitions have identical text. Example where {{sfn}} will create a ref name with another reference inside it:
<ref name="Buna">Advance to Buna</ref> {{sfn|Blakeley|1956|ps=. Cited in Advance to Buna.<ref name=Buna />}} {{sfn|Blakeley|1956|ps=. Cited in Advance to Buna.<ref name=Buna />}}
Removing the inner reference will fix the error.
Technical
Pages with this error message are placed into Pages with duplicate reference names. The system message page is at Cite error references duplicate key.
Templates
In order to include variable data within a reference tag such as <ref ref_content name=ref_name>
, the #tag
parser function must be used. Currently #tag
only supports balanced tags, not a singular tag, thus <tag_type element />
cannot normally be used in a template unless the element is hard coded.
However, Cite has been modified since 2008[1] to treat <ref name="ref-foo"></ref>
identically to <ref name="ref-foo" />
. Note that there cannot be even a space between the <ref . . .>
and the </ref>
, otherwise this will result in definition of the reference named "ref-foo" to be " ", which if meant to be second reference by name to an existing reference will cause a duplicate definition error. Correct code to produce a singular tag will look like {{#tag:ref ||name={{{parameter}}}}}
, that is, no space between the two "|"s.