Page MenuHomePhabricator

SpecialMobileCite should use LinkRenderer
Closed, ResolvedPublic0.5 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

Legoktm created this task.Jun 24 2016, 12:18 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 24 2016, 12:18 PM
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 triaged this task as Low priority.Jun 30 2016, 8:23 PM
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 claimed this task.Jul 12 2016, 9:00 AM
Legoktm raised the priority of this task from Low to Normal.

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

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

Jdlrobson closed this task as Resolved.Jul 12 2016, 8:39 PM

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

@Jdlrobson Does this need Web points?

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