Heiya,
just a quick question. Let's assume that I set up mulitple foreign file repos for my wiki. What happens when e.g. two of them contain a file with the same name? Will the wiki a) error out, b) show nothing, c) show the first file it finds d) show an arbitrary file from the set if finds or ...
Thanks for your insight.
Cheers,
Karsten
Well, I was asking about step 2 prior to step 1. Is it even possible to set up multiple foreign file repos (api) and how could this be done?
Cheers Karsten
Am 13.03.2018 um 12:17 schrieb [[kgh]]:
Heiya,
just a quick question. Let's assume that I set up mulitple foreign file repos for my wiki. What happens when e.g. two of them contain a file with the same name? Will the wiki a) error out, b) show nothing, c) show the first file it finds d) show an arbitrary file from the set if finds or ...
Thanks for your insight.
Cheers,
Karsten
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Yeah, it should be possible. $wgForeignFileRepos is an array and can take multiple entries. Its probably not tested very often, but no reason it shouldn't work. If you do run in to trouble, file a bug.
I expect (but didn't test) that if there are multiple files with same name, it will show the first one it finds
-- Brian
On Tue, Mar 13, 2018 at 3:39 PM, [[kgh]] mediawiki@kghoffmeyer.de wrote:
Well, I was asking about step 2 prior to step 1. Is it even possible to set up multiple foreign file repos (api) and how could this be done?
Cheers Karsten
Am 13.03.2018 um 12:17 schrieb [[kgh]]:
Heiya,
just a quick question. Let's assume that I set up mulitple foreign file repos for my wiki. What happens when e.g. two of them contain a file with the same name? Will the wiki a) error out, b) show nothing, c) show the first file it finds d) show an arbitrary file from the set if finds or ...
Thanks for your insight.
Cheers,
Karsten
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
We have this setup in Wikimedia production (kinda…): test2.wikipedia.org has both test.wikipedia.org and commons.wikimedia.org configured as foreign file repos. Conveniently it's a testing wiki, so you can try out how exactly this works.
Thanks a lot for your answers Brian and Bartosz! It indeed is a great feature if it was possible to configure multiple foreign file repos.
I have just tested on test2wiki and it seems that either the file uploaded first is preferred or an arbitrary file of the two is used. I guess I should document this.
@Bartosz Could you point me to the configuration of the two repos for test2wiki? I was not able to find anything related to this in "InitialiseSettings.php" etc. I suspect / speculate that it is done via the "ForeignDBViaLBRepo" class which would not help me. But one never knows. Trying to somehow create an array of arrays with the "ForeignAPIRepo" class does not work.
What I have locally realized on my personal testwiki with the following setting is I get all files from hewiki and commonswiki as well. This suprised me a bit though I have to note that description fetching only works for hewiki files.
$wgForeignFileRepos[] = [ 'class' => 'ForeignAPIRepo', 'name' => 'hewikipedia', 'apibase' => 'https://he.wikipedia.org/w/api.php', 'url' => 'https://upload.wikimedia.org/wikipedia/he', 'thumbUrl' => 'https://upload.wikimedia.org/wikipedia/he/thumb', 'hashLevels' => 2, 'transformVia404' => false, 'fetchDescription' => true, 'descriptionCacheExpiry' => 43200, 'apiThumbCacheExpiry' => 0, ];
Cheers Karsten
Am 14.03.2018 um 10:10 schrieb Bartosz Dziewoński:
We have this setup in Wikimedia production (kinda…): test2.wikipedia.org has both test.wikipedia.org and commons.wikimedia.org configured as foreign file repos. Conveniently it's a testing wiki, so you can try out how exactly this works.
On 2018-03-14 12:11, [[kgh]] wrote:
@Bartosz Could you point me to the configuration of the two repos for test2wiki? I was not able to find anything related to this in "InitialiseSettings.php" etc. I suspect / speculate that it is done via the "ForeignDBViaLBRepo" class which would not help me. But one never knows. Trying to somehow create an array of arrays with the "ForeignAPIRepo" class does not work.
It's in a separate file: https://noc.wikimedia.org/conf/highlight.php?file=filebackend.php
Search for '$wgForeignFileRepos' near the end.
mediawiki-l@lists.wikimedia.org