Jump to content

Topic on Extension talk:GlobalUsage

Global usage links not showing on master wiki

1
Synonymshawfinch (talkcontribs)

Hi all, I've got a wiki farm set up in several languages with file uploads centralized on the English version. GlobalUsage is enabled but I'm having the following issues:

  • The global usage section shows on all wikis but the English one (where files actually live).
  • In the other languages, the global usage section shows but file usage from the English wiki is missing.

I checked the globalimagelinks table and the only entries where gil_wiki corresponds to the English wiki are missing (wanted files). If I run refreshGlobalimagelinks.php --pages=existing,nonexisting from an empty table, only those 'wanted files' are created.

Here are the relevant bits of my config for reference:

if ($wgLang != $availableLanguages[0]) {
	$wgEnableUploads = false;
	$wgUploadNavigationUrl = "/wiki/en/Special:Upload";

	$wgUseSharedUploads = true;
	$wgSharedUploadPath = '/wiki/images';
	$wgSharedUploadDirectory = $IP . '/images';
	$wgHashedSharedUploadDirectory = true;
	
	$wgFetchCommonsDescriptions = true;
	$wgSharedUploadDBname = $databasePrefix . $availableLanguages[0];
	$wgSharedUploadDBprefix = 'wiki_';
	$wgRepositoryBaseUrl = "https://mysite.com/wiki/en/File:";
}

(Here $wgLang is the language code of the wiki and $availableLanguages[0] is just en for English. All I'm doing is setting up a shared uploads wiki for all languages but English.)

wfLoadExtension('GlobalUsage');

$wgGlobalUsageDatabase = $databasePrefix . $availableLanguages[0] . '-' . $wgDBprefix;

foreach ($availableLanguages as $availableLanguage) {
	$wgConf->suffixes[] = $databasePrefix . $availableLanguage . '-' . $wgDBprefix;
	$wgConf->settings["wgCanonicalServer"]["$databasePrefix$availableLanguage-$wgDBprefix"] = "https://mysite.com";
	$wgConf->settings["wgArticlePath"]["$databasePrefix$availableLanguage-$wgDBprefix"] = "/wiki/$availableLanguage/$1";
}

(Here the loop on $availableLanguages just sets up $wgConf for each wiki.)

I have also tried to add a $wgLBFactoryConf, but to no avail.

Any help on the matter would be greatly appreciated.

Reply to "Global usage links not showing on master wiki"