Page MenuHomePhabricator

External URL fails to render in citations
Closed, DeclinedPublic

Description

Author: contactbox

Description:
Working with [[Template:Derefer]]

Some links render correctly (link with description underlined) but others don
't (no rendering of link or text). There is no obvious cause for this.

Page demonstrating this:

http://en.wikipedia.org/wiki/User_talk:FT2/test01


Version: unspecified
Severity: normal

Details

Reference
bz5983

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:14 PM
bzimport added a project: Cite.
bzimport set Reference to bz5983.
bzimport added a subscriber: Unknown Object (MLST).

contactbox wrote:

Theres definitely a bug in cite.php.

See the above sample page, there's an ordinary [...] external link that
renders correctly on the page, but incorrectly in a footnote.

Permalink provided.

contactbox wrote:

PS -- the article it's affecting is being honed by Raul for a featured
article. I know that's not a crucial thing but if it is by chance an
obvious quick fix, it'd be great :)

Thanks!

It's due to the = on the Url. It's treated by mediawiki as a template parameter
name. Use instead {{Derefer|1=<URL>}} instead of {{Derefer|<URL>}}

You can see my fixing edit

contactbox wrote:

I see the fix and thank you.

Problem is that its very unobvious and will
probably catch others out too. Should the template
rendering system be tweaked slightly so that "="
is not taken as a template parameter definition
but as part of the text, if certain obvious
conditions are met?

Obvious conditions are that if the text to the
left of the "=" includes "http://" or simply the "/
" character, then an "=" to the right is probably
part of the data, and not a parameter setting.

ncw33 wrote:

In any case, this is just a part of the way the parser for templates works. As with the updated docs for the derefer template, most templates with this as a potential problem mention it in their documentation, so this is not so much of a problem. I don't think there is a Cite.php bug here after all, so closing as WONTFIX, since I suspect, given the complexity involved, the guys working on the parser level will not change things there for corner cases like this.