Page MenuHomePhabricator

SpecialMobileCite should use LinkRenderer
Closed, ResolvedPublic0.5 Estimated Story Points

Description

SpecialMobileCite.mustache
<div class="mobile-cite-article-link-container">
	<a href="{{article_link}}">{{article_link_title}}</a>
</div>
{{{html}}}

Links to articles should not be created manually like this, it needs to go through LinkRenderer. Please see https://mediawiki.org/wiki/Manual:LinkRenderer for usage.

Event Timeline

dr0ptp4kt renamed this task from SpecialMobileCite should not bypass LinkRenderer and manually create links to pages to SpecialMobileCite should use LinkRenderer.Jun 27 2016, 5:16 PM

The value of article_link comes from $title->getLocalURL() which is passed into the template. I'm thus not too clear on what the issue is here.

The value of article_link comes from $title->getLocalURL() which is passed into the template. I'm thus not too clear on what the issue is here.

Please look at all of the other code that LinkRenderer does, and you'll see everything that's missing, like title attribute, stub classes, etc. In general, when MediaWiki has a standard way of doing something (Linker/LinkRenderer), its best to use it instead of attempting to reinvent the wheel and falling dramatically short.

I see. Sorry the description misled me as I thought you were specifically talking about the URL not the tag. Understood.

jhobs moved this task from Incoming to Triaged but Future on the Readers-Web-Backlog board.

Change 298427 had a related patch set uploaded (by Legoktm):
SpecialMobileCite: Don't bypass LinkRenderer

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

Legoktm raised the priority of this task from Low to Medium.

Change 298427 merged by jenkins-bot:
SpecialMobileCite: Don't bypass LinkRenderer

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

Note there is a follow patch to remove the templating but this bug is now fixed.

Jdlrobson set the point value for this task to 0.5.Jul 18 2016, 5:21 PM