Page MenuHomePhabricator

API documentation generates duplicate IDs with $wgExperimentalHtmlIds = true
Closed, ResolvedPublic

Description

Translatewiki has $wgExperimentalHtmlIds = true.

https://translatewiki.net/w/api.php contains:

<h3 id="main/datatypes" class="apihelp-header"><span id="main/datatypes"></span>
[...]
<h3 id="main/credits" class="apihelp-header"><span id="main/credits"></span>

This contains duplicate IDs: main/datatypes and main/credits.

https://validator.w3.org/nu/?doc=https%3A%2F%2Ftranslatewiki.net%2Fw%2Fapi.php generates:

Error: Duplicate ID main/datatypes.

From line 59, column 48; to line 59, column 73

p-header"><span id="main/datatypes"></span

Warning: The first occurrence of ID main/datatypes was here.

From line 59, column 1; to line 59, column 47

l></div>↩↩<h3 id="main/datatypes" class="apihelp-header"><span 

Error: Duplicate ID main/credits.

From line 74, column 96; to line 74, column 119

p-header"><span id="main/credits"></span

Warning: The first occurrence of ID main/credits was here.

From line 74, column 51; to line 74, column 95

</dd></dl><h3 id="main/credits" class="apihelp-header"><span

Details

Related Gerrit Patches:

Event Timeline

Fomafix created this task.May 2 2016, 8:44 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 2 2016, 8:44 AM

Change 286398 had a related patch set uploaded (by Gerrit Patch Uploader):
API: Avoid duplicate IDs in API documentation

https://gerrit.wikimedia.org/r/286398

Anomie moved this task from Unsorted to Needs Review on the MediaWiki-API board.May 2 2016, 1:29 PM

Change 286398 merged by jenkins-bot:
API: Avoid duplicate IDs in API documentation

https://gerrit.wikimedia.org/r/286398

Anomie closed this task as Resolved.May 19 2016, 6:07 PM
Fomafix triaged this task as Medium priority.Aug 15 2016, 9:32 AM
Fomafix removed a project: Patch-For-Review.

Verified on Translatewiki.