Jump to content

Requests for technical support from the VASP team should be posted in the VASP Forum.

Template:KnownIssueDupCheck

From VASP Wiki
Revision as of 08:41, 26 June 2026 by Liebetreu (talk | contribs) (Created page with "<includeonly>{{#invoke:KnownIssue|checkdupes}}</includeonly><noinclude> == Template:KnownIssueDupCheck == Place this '''once''' on a page that uses Template:KnownIssue (typically just above the table). It scans the page source and shows a red warning for either of: * '''Duplicate IDs''' — an integer <code>ID</code> used by more than one <code>KnownIssue</code> (these would emit the same <code>#KnownIssue''N''</code> anchor twice). * '''Missing IDs''' — rows wit...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:KnownIssueDupCheck

Place this once on a page that uses Template:KnownIssue (typically just above the table). It scans the page source and shows a red warning for either of:

  • Duplicate IDs — an integer ID used by more than one KnownIssue (these would emit the same #KnownIssueN anchor twice).
  • Missing IDs — rows with no ID assigned.

Each is a separate message. When everything is clean it renders nothing.

{{KnownIssueDupCheck}}
{| class="sortable wikitable"
...
{{KnownIssue | ID = 73 | ... }}
{{KnownIssue | ID = 74 | ... }}
|}

How it works

It reads the current page via mw.title.getCurrentTitle():getContent() (see Module:KnownIssue) and counts ID parameters across every KnownIssue call on the page, including hide=yes and anchor=no rows.

Caveats

Saved revision only
getContent() returns the last saved version of the page, so

while previewing an unsaved edit the check will not yet reflect your changes — save and reload to re-run it.

Source-level
It counts literal KnownIssue calls in the page source; issues

pulled in by transclusion from another page are not seen.

Expensive
getContent() is a MediaWiki "expensive" parser call. One use per

page is well within limits.