ImageRangeTest is a the range check template; it returns either a 0 or a 1 depending on if the {{{1}}} number is in any of the matching ranges. The number indicates a specific graphic in a game - there's a max possible graphic number, and there are unused graphic positions, so this allows me to test if the particular graphic is one that exists, or which doesn't exist.
This is a simplified version of the ifeq test I'm using to then link to an image of that particular graphic: {{#ifeq: {{ImageRangeTest | {{{1}}} }} | 1 | This image does not exist. | [[File:{{{1}}}.png]] }}
Everything works fine, displays fine, etc. The resulting HTML is fine; either it has the img tag and links the image, or there is no img tag, and "This image does not exist." is displayed.
- However*, there's still one problem, and it looks like a possible bug with #ifeq. When I look at Special:WantedFiles, all of those {{{1}}}.png files that fail the rangetest here show up there as missing files. When I look at the details on any of them, the only page showing a link to any particular missing file is the one which has the above ifeq test.
So, say the page name is Foobar, and {{{1}}} is 2001. 2001 fails the rangecheck. The template then creates the text "This image does not exist." on the page Foobar. The generated HTML for Foobar has no img tag linking 2001.png. However, Special:WantedFiles still shows 2001.png as a WantedFile, and File:2001.png shows: File usage The following page uses this file:
- Foobar
So it looks like both possible results from an #if are generated, and only then is the system deciding which one to actually use - which in this case, is generating a bogus WantedFile. (And in my case, that adds up to a few thousand bogus wantedfile entries, making it much harder to spot valid wantedfiles.)