Page MenuHomePhabricator

Broken rendering with missing template parameters in templates called inside {{#if:}}
Closed, ResolvedPublic

Description

I am not completely sure about the cause, but I have come by a strange behaviour by some templates (e.g. http://commons.wikimedia.org/w/index.php?title=Image:Policarpa_Salavarrieta_2_pesos_Oro.jpg&oldid=8606384). After a bit of playing, I was able to create a quite simple reproducible test case (see the URL at this bug report):

  • a template uses some parameters without default values
  • you make a call to the template, with some parameters not defined
  • and you wrap the call to some {{#if:}}, even with a constant condition

The result: strangely broken rendering.

(I am not sure if the bug is in the parser proper, or in the ParserFunctions.)


Version: unspecified
Severity: normal
URL: http://test.wikipedia.org/wiki/TemplateParametersBug

Details

Reference
bz12488

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:59 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz12488.
bzimport added a subscriber: Unknown Object (MLST).

Looks fine in the new preprocessor:

http://test.wikipedia.org/w/index.php?title=TemplateParametersBug&oldid=30068&timtest=newpp

This is an old bug, it's due to double-parsing during template expansion, $noparse=$noargs=false in braceSubstitution(). Probably a duplicate report.

Oh yes, I have (maybe) found it (even though I tried to find it before reporting, unsuccessfully…). Wouldn’t it be bug:5678?

  • This bug has been marked as a duplicate of bug 5678 ***