Thread:Project:Support desk/How does ifeq evaluate in mediawiki?/reply

It's due to you running such an old version of MediaWiki. Update it and your issue should be resolved (Note: ifeq does string comparison regardless of what the parameters actually are, because it is parsing wikitext, which is always a string). Alternatively, switch your order, e.g.  and it should work on your current mediawiki version. But you should upgrade anyway, as 1.15 is no longer receiving support and security updates, so your wiki could be quite vulnerable.

To elaborate, MediaWiki versions before 1.16 (I think that's the one, at least) always fully parsed both sides of the #ifeq (and similarly every condition of the #switch), although it only output the side that matched. This means parser functions with side effects such as #vardefine would behave incorrectly because they are actually getting called multiple times, and the very last call of #vardefine is what sets the value. As of 1.16, the only side that gets parsed is the branch that was taken.