Page MenuHomePhabricator

XHTML validation errors -- some "id" attributes are not unique
Closed, ResolvedPublic


Author: ben.rimmington


The page is invalid XHTML, because some of the "id" attributes for <cite> elements are not unique.


  1. Launch the validator:
  2. Enter the address:
  3. Click the "Check" button, or press the Return key.


  • Errors found while checking this document as XHTML 1.0 Transitional!
  • Result: 6 Errors
  • Line 697, Column 128: ID "CITEREFPodolakWeizman.2C_A..3B_Marley.2C_M.1995" already defined.
  • An "id" is a unique identifier...
  • ...


  • This document was successfully checked as XHTML 1.0 Transitional!
  • Result: Passed
  • ...


  1. In the wikitext, the <ref name=Podolak1995> and <ref name=pass43> elements contain the same information (except that the first also contains an url).
  2. The duplicate "id" attributes don't appear to be used within the XHTML document.
  3. Possibly related to Bug 10218 [Sanitizer doesn't validate attribute values according to DTD].

Version: 1.15.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:31 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz17650.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Feb 24 2009, 3:04 PM

There already is some bug about necessity of checking for duplicate id's provided by users through wikitext, however I'm currently unable to find it. Try to search, please, and then mark this as a dupe of it.

I found only mine bug 13926 which is not exactly that one I have in my mind. But it's of similar nature.

ben.rimmington wrote:

@Danny B: I found the following bugs:

Bug 4515 [The Sanitizer doesn't validate the contents of id attributes] (resolved as duplicate of 9530).

Bug 6301 [Multiple stub templates in an article make it non-W3C-compliant] (resolved as duplicate of 4515).

Bug 7356 [User-specified HTML IDs can be the same as interface IDs].

Bug 7662 [HTML IDs for headings can be the same than existing IDs] (resolved as duplicate of 7356).

Bug 9530 [Section heading anchors shouldn't begin with invalid characters].

Bug 10218 [Sanitizer doesn't validate attribute values according to DTD].

Bug 11625 [Extensions are Blind to IDs and Anchor Names Already in Use] (resolved as duplicate of 7356).

I don't know if any of those bugs are a match, because in this case the "id" attributes are generated by the parser, not hard-coded by the user. I'm also unaware of what the Sanitizer does, and whether it is responsible for fixing this kind of problem.

Is the wikitext of the article invalid? Should the <ref name=Podolak1995> and <ref name=pass43> wikitext elements somehow refer to a shared {{cite}} element in the ==References== section, instead of using their own inline {{cite}} elements?

P.S. Is your Bug 13926 a duplicate of Bug 7356? (Comments 6 and 7 also mention using an "mw-" prefix).

demon added a comment.Jul 29 2009, 7:00 PM
  • This bug has been marked as a duplicate of bug 7356 ***