Help talk:Parser functions in templates

logical error
I think there's a logical error here. It's easiest to see in the table at the bottom. In sample 1, is true for both being defined and for being not defined. How can it both be defined and not defined? -Khono
 * I think it is right. If you call, then both and  will return "bar" (in template:foo), why the #if statement treat both as true. --79.136.98.249 23:13, 1 September 2009 (UTC)

White spaces
Is there any parser function that strip leading and tailing white spaces, or one that change them into "%20" or "_"? I try to make a template that includes a link to wikipedia.

--Petter Källström, 79.136.98.249 23:13, 1 September 2009 (UTC)
 * givs: See phoo Wikipedias article - NOK (.../wiki/).
 * givs: See Wikipedias article - OK (.../wiki/phoo).
 * givs: See bar Wikipedias article - NOK (.../wiki/phoo).
 * givs: See Wikipedias article - NOK (../wiki/Parser).

parameter specified or not
One way to test whether a parameter was specified in a template call is thus:  

Could an expert please check whether this is true? I find it returns "v was specified (and may be empty)" only when "|v=" or "|v=text" is in the template call code, otherwise "|v" (without any =) returns "v was not specified ". The latter behaviour is unexpected. -84user 18:20, 27 September 2009 (UTC)
 * I may have misunderstood, but why is the latter behaviour unexpected? When = is missing, v is interpreted as an unnamed parameter, not as parameter v, so parameter v is missing. I believe that is the correct behaviour. Hamilton Abreu 00:09, 24 January 2010 (UTC)

Inconsistency → Incomprehensibility
I can't even figure out what's supposed to happen. There are two examples given with different syntax and different outputs for both conditions:
 * Sample A   ''(no parameter, no pipe)
 * Sample B   ''(no parameter, has pipe)
 * Sample A
 * condition true Parameter 1 is not defined, or is defined and non-null/non-empty.
 * condition false Parameter 1 is null. It contains only empty string(s) or breaking space(s) etc.
 * Sample B
 * condition true Parameter 1 is defined and non-null/non-empty.
 * condition false Parameter 1 is not defined, or is defined but null. It contains only empty string(s) or breaking space(s) etc.

But only one result is shown for each sample: the if-true output for Sample A, and the if-false output for Sample B.

If I get the general idea correctly, the presence or absence of the pipe should affect the test. But the paragraph doesn't even say whether parameter 1 is being supplied, and if so whether it's null or blanks only or nonblank or what. --Thnidu (talk) 17:52, 2 October 2012 (UTC)

Max depth of nested #if parser functions.
I have a rather large set of nested #ifexpr: tests (48 so far, with intent to add another 30), and I have found that it is not returning the correct values for anything that is past the 40th response. Is there a max nest limit of 40 for this function? -- ShoeMaker  ( Contributions &bull; Message )   22:35, 30 December 2012 (UTC)


 * After some in depth testing on a wiki running MediaWiki 1.19.1 with ParserFunctions (Version 1.4.1) there is a nesting limit of 40. I managed to rework my template and section it into chunks.  There should be a note added to the Help page itself if anyone can confirm this to be true (my personal testing is not proof to me, could be a bug on my wiki). -- ShoeMaker   ( Contributions &bull; Message )   03:32, 31 December 2012 (UTC)