https://bugzilla.wikimedia.org/show_bug.cgi?id=45774
Web browser: ---
Bug ID: 45774
Summary: mw.title.exists does not properly handle the Media:
idiom used by #ifexist
Product: MediaWiki extensions
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Unprioritized
Component: Scribunto
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
The current version of the mw.title library as used on test2 does not properly
handle the existence of non-local (Commons) files. Instead of a title object
for "Media:<filename>" having a true "exists" value, as #ifexist does if a file
by that name has been uploaded to the Commons, said "exists" value is false.
Based on my quick inspection of the code, it appears that the library does not
give special treatment to the Media: namespace, unlike the original parser
function.
Example:
exampleFile = mw.title.new("Media:I-10.svg")
print(exampleFile.exists)
Expected result:
true
Actual result:
false
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l