Anomie added a comment.
In https://phabricator.wikimedia.org/T85153#940817, @jayvdb wrote:
Maybe it is something special about WMF projects that is causing filerepoinfo to not work correctly?
filerepoinfo is working correctly. The difference is that the referata.com site is using ForeignAPIRepo while WMF wikis use ForeignDBViaLBRepo, and the two classes supply different information.
In https://phabricator.wikimedia.org/T85153#941093, @XZise wrote:
For example the rootUrl on the wikipedia server is `//upload.wikimedia.org/wikipedia/commons` which can be worked with, but on referata.com it's `/w/images`. And well another example is wikitravel http://wikitravel.org/wiki/en/api.php?action=query&meta=filerepoinfo&continue=&format=jsonfm which uses `/upload/en`.
That depends on how the repo is configured on each wiki.
Then `articlepath` and `server` aren't always present on non-local repositories as seen in wikitravel's example for the repo “shared”. This is even worse:
Presumably the "shared" repo there is using ForeignDBRepo or ForeignDBViaLBRepo, while the "wikimediacommons" repo is using ForeignAPIRepo.
The only other aren't unique too as seen in the examples here: the name “shared” is commons in wikipedia so not unique, displayname is “Wikimedia Commons” in enwp and “a shared repository” in referata).
The name used also entirely depends on how the repos are configured on each wiki.
Instead of focusing on the fact that things are different without any context, you'd probably be better served by trying to work out which bits of information are possible to standardize across the different FileRepo subclasses based on the configuration options each receives.
TASK DETAIL https://phabricator.wikimedia.org/T85153
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Anomie Cc: Aklapper, XZise, Anomie, jayvdb, Legoktm, pywikipedia-bugs