Page MenuHomePhabricator

Template generated data-mw include incomplete href
Closed, ResolvedPublic

Description

I have observed a few imcomplete href in data-mw, for example:

For https://en.wikipedia.org/api/rest_v1/page/html/Val_d'Aran
It has: data-mw ={"parts": [{"template":{"target":{"wt":"Infobox settlement\n", "href":"./Infobox_settlement"}}
But it should be: "href":"./Template:Infobox_settlement"

For https://uk.wikipedia.org/api/rest_v1/page/html/%D0%90%D0%B2%D1%81%D1%82%D1%80%D0%BE-%D0%A3%D0%B3%D0%BE%D1%80%D1%89%D0%B8%D0%BD%D0%B0
It has: data-mw ={"parts": [{"template":{"target":{"wt":"foo", "href":"./Картка:Колишня_країна}}
But it should be "href":"./Шаблон:Картка:Колишня_країна"

Event Timeline

Yananqian created this task.Oct 9 2016, 8:54 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 9 2016, 8:54 AM
ssastry triaged this task as Medium priority.Oct 16 2016, 4:34 AM
ssastry added a subscriber: ssastry.EditedOct 16 2016, 4:39 AM

Looks like a comment after the template name is tripping us up.

{{Infobox settlement
<!-- See Template:Infobox settlement for additional fields and descriptions -->
 | name                   = Aran
}}

Without the comment, the Template namespace is correctly added.

Change 316213 had a related patch set uploaded (by Subramanya Sastry):
T147742: Trim template target after stripping comments

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

ssastry moved this task from Backlog to In Progress on the Parsoid board.Oct 16 2016, 5:18 AM
ssastry renamed this task from Template generated data-mw include imcomplete href to Template generated data-mw include incomplete href.Oct 16 2016, 5:29 AM

Change 316213 merged by jenkins-bot:
T147742: Trim template target after stripping comments

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

ssastry closed this task as Resolved.Nov 17 2016, 9:48 PM
ssastry claimed this task.
ssastry removed a project: Patch-For-Review.
ssastry removed a subscriber: gerritbot.