Last modified: 2010-05-05 19:38:20 UTC
The parser function {{#ifexist}} works as expected (i.e. checks for an existence of a file, even if it's on commons) if used with Media: prefix, but not with Image: or File:. I think it is because of the following code in ParserFunctions_body.php: if( $title->getNamespace() == NS_MEDIA ) { /* If namespace is specified as NS_MEDIA, then we want to * check the physical file, not the "description" page. */ It should test here also for the File: and Image: prefixes.
I'd say this is a feature rather than a bug: you can test for the existence of the file description page with {{#ifexist:File:Foo.png}} and for the existence of the actual file with {{#ifexist:Media:Foo.png}}
(In reply to comment #1) > I'd say this is a feature rather than a bug Indeed. It's even (deep breath) *documented* as such: [[mw:Help:Extension:ParserFunctions##ifexist]].