ve.init.mw.Platform.js currently hard-codes searching from Commons, even if the wiki doesn't actually load images from Commons. We should do this based on wiki config instead.
Version: unspecified
Severity: minor
ve.init.mw.Platform.js currently hard-codes searching from Commons, even if the wiki doesn't actually load images from Commons. We should do this based on wiki config instead.
Version: unspecified
Severity: minor
Ideally we'd avoid hardcoding Commons entirely and instead of exporting isInstantCommons, we'd export fileRepos. That should be almost as easy to do and would fix other things as well:
Especially reason #1 since we do use InstantCommons in production but not the default settings through the UseInstantCommons toggle. We could hardcode some detection and export "isUsingCommonsAsARepoSomehow", but might as well take a few more minutes and figure out how to just export an array of api urls.
(In reply to comment #1)
Ideally we'd avoid hardcoding Commons entirely and instead of exporting
isInstantCommons, we'd export fileRepos.
Indeed; that was what I was thinking when I wrote this bug. Title modified to be clearer.
humpface wrote:
This was very frustrating for my work's internal wiki. First, I didn't want any Instant Common images (and thanks to James, I was able to remove the line of code). However, since I disabled the use of Instant Commons ($wgUseInstantCommons = false;), I was still able to search through the Instant Commons but after saving, everything showed up as a broken link.
Suggestion:
This can now be done by using the new meta=filerepoinfo API query, which was introduced into core in gerrit 85344.
Change 102377 had a related patch set uploaded by Mooeypoo:
Use image sources from API's fileRepo