Page MenuHomePhabricator

Using "insert media" VisualEditor feature fails if you have wgForeignFileRepos set
Open, Needs TriagePublic

Description

Hi, when you set wgForeignFileRepos so that another wiki acts like commons.wikimedia.org it fails when searching for files in the "insert media" feature.

It's failing with:

https://<url>/w/undefined/api.php?action=query&format=json&origin=*&generator=search&gsrnamespace=6&iiurlheight=200&iiprop=dimensions%7Curl%7Cmediatype%7Cextmetadata%7Ctimestamp%7Cuser&prop=imageinfo&gsrsearch=Main&iiurlwidth=300&gsroffset=0&gsrlimit=15

One of our sysops has said this "the error is somewhere inside https://github.com/wikimedia/mediawiki-extensions-VisualEditor/blob/master/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js, but the mw.Api object should just return a normal URL."

Event Timeline

I'm not seeing this error on my wiki (unable to reproduce) although I do use wgForeignFileRepo as described here.

Although I don't get an error, I'm trying to solve a different problem: I don't get any search results from my 'pool' wiki.