Help:Duplicate parameters

From Festipedia, hosted by the FR Heritage Group

Previewing a page may produce an error message like this at the top:

Warning: Example (edit) is calling Template:Cite web with more than one value for the "date" parameter. Only the last value provided will be used. (Help)

The error happens when a page is calling a template and tries to assign a value to the same parameter (also called argument) more than once, for example |date= here:

{{Cite web|date=2014|title=Cars|date=2016}}

Removing one of the assignments will eliminate the warning, but please consider whether the real error is that one of the parameters should have been named differently, for example accessdate= instead of date=.

The message is not shown on the saved page, so readers will not see it, but it should still be fixed. Later editors may not notice the issue and mistakenly change the value of the first assignment. This will have no effect on the rendered page, since only the last assigned value is used.

It also happens if the same value is assigned twice:

{{Cite web|date=2016|title=Cars|date=2016}}

Such cases should also be fixed to prevent future confusion.

A blank assignment will also cause the error:

{{Cite web|date=2014|title=Cars|date=}}

Editors often copy example code with many blank assignments, so watch out for this.

Templates can have unnamed parameters which are automatically called 1=, 2=, 3=, etc. by the software. Text with no equals sign after a pipe is interpreted as an unnamed parameter, for example |2014|. The first unnamed parameter is called "1" and so on, so this code would produce the error for "1=":

{{Cite web|1=2014|title=Cars|2014}}

Pages with the error are automatically placed in a hidden category called Category:Pages using duplicate arguments in template calls. Its name is determined by MediaWiki:Duplicate-args-category. It is listed at Special:TrackingCategories with the description in MediaWiki:Duplicate-args-category-desc.

The error message is generated by MediaWiki:Duplicate-args-warning.

Locating the error[edit]

  • The Find feature in most browsers can be used on the template name or parameter name in the error message.
  • You can preview a section of the page to see whether the error is in the previewed section. For testing you can also delete parts of the page while previewing. Do not save such tests.
  • If you cannot locate the error, it may be in a transcluded page or template. The bottom of the preview window shows a list of transcluded pages under the heading "Templates used in this preview (help) :".