Page MenuHomePhabricator

Add Wikidata support for awawiki
Closed, ResolvedPublic

Description

Once the wiki has been created, obviously.

From https://wikitech.wikimedia.org/wiki/Add_a_wiki#Wikidata :

  • Make sure that the language code appears in the file wmf-config/InterwikiSortOrders.php in the operations/mediawiki-config repo. (Example: https://gerrit.wikimedia.org/r/359810) (apparently no longer needed ad compact language links is deployed everywhere?
  • Run populateSitesTable on at least all Wikidata clients (including wikidatawiki itself and testwikidata). (Done in T253756#6170109)

Notes:

foreachwikiindblist wikidataclient extensions/Wikibase/lib/maintenance/populateSitesTable.php --force-protocol https

Beware: The script sometimes fails with a duplicate key conflict. In that case, go to the wiki's master database and empty the sites and site_identifiers tables, then run the script again. It's probably also wise to backup these tables from Wikidata and at least one Wikipedia before running the script across the whole fleet. Breaking the sites, site_identifiers tables will break page rendering of many wikis!

Event Timeline

Kizule removed a project: User-Kizule.
Ladsgroup changed the task status from Stalled to Open.May 20 2020, 1:05 PM

Change 599008 had a related patch set uploaded (by Addshore; owner: Addshore):
[operations/mediawiki-config@master] Add awa to InterwikiSortOrders.php

https://gerrit.wikimedia.org/r/599008

My first reflection on this little extra "wikidata" section on https://wikitech.wikimedia.org/wiki/Add_a_wiki#Wikidata is that the InterWikiSorting config change is not really related to Wikidata, and if a custom order is desired this should be done as part of the main wiki configuration...

Thoughts @Ladsgroup @hoo @WMDE-leszek ?

Change 599008 abandoned by Addshore:
Add awa to InterwikiSortOrders.php

Reason:
Apparently this is no longer needed ad compact language links is deployed everywhere?

https://gerrit.wikimedia.org/r/599008

I looked into if we would be able to just use addSite.php.

so the one complexity of using addSite is the interwiki id stuff

as on aawiki, the interwiki . nav id of "awa" needs to be added to the site, but on aawiktionary, that interwiki does not need to be specified when adding the site

so it wouldnt be as simple as running addsite over all clients

other than that, it would all work TM

So then I tried running populateSitesTable on testwiki to get a feel for it and it went fine.

I then started a run over all clients, and the following happened:

1addshore@deploy1001:~$ foreachwikiindblist wikidataclient extensions/Wikibase/lib/maintenance/populateSitesTable.php --force-protocol https
2
3-----------------------------------------------------------------
4aawiki
5-----------------------------------------------------------------
6
7
8aawiki: done.
9-----------------------------------------------------------------
10aawikibooks
11-----------------------------------------------------------------
12[9e5de6a021baf53f38af2d22] [no req] MWException from line 505 of /srv/mediawiki/php-1.35.0-wmf.34/includes/cache/localisation/LocalisationCache.php: No localisation cache found for English. Please run maintenance/rebuildLocalisationCache.php.
13Backtrace:
14#0 /srv/mediawiki/php-1.35.0-wmf.34/includes/cache/localisation/LocalisationCache.php(363): LocalisationCache->initLanguage(string)
15#1 /srv/mediawiki/php-1.35.0-wmf.34/includes/cache/localisation/LocalisationCache.php(372): LocalisationCache->loadItem(string, string)
16#2 /srv/mediawiki/php-1.35.0-wmf.34/includes/cache/localisation/LocalisationCache.php(304): LocalisationCache->loadItem(string, string)
17#3 /srv/mediawiki/php-1.35.0-wmf.34/includes/language/LanguageFallback.php(106): LocalisationCache->getItem(string, string)
18#4 /srv/mediawiki/php-1.35.0-wmf.34/includes/language/LanguageFactory.php(167): MediaWiki\Languages\LanguageFallback->getAll(string)
19#5 /srv/mediawiki/php-1.35.0-wmf.34/includes/language/LanguageFactory.php(114): MediaWiki\Languages\LanguageFactory->newFromCode(string)
20#6 /srv/mediawiki/php-1.35.0-wmf.34/includes/ServiceWiring.php(212): MediaWiki\Languages\LanguageFactory->getLanguage(string)
21#7 /srv/mediawiki/php-1.35.0-wmf.34/includes/libs/services/ServiceContainer.php(451): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
22#8 /srv/mediawiki/php-1.35.0-wmf.34/includes/libs/services/ServiceContainer.php(419): Wikimedia\Services\ServiceContainer->createService(string)
23#9 /srv/mediawiki/php-1.35.0-wmf.34/includes/MediaWikiServices.php(605): Wikimedia\Services\ServiceContainer->getService(string)
24#10 /srv/mediawiki/php-1.35.0-wmf.34/includes/Setup.php(693): MediaWiki\MediaWikiServices->getContentLanguage()
25#11 /srv/mediawiki/php-1.35.0-wmf.34/maintenance/doMaintenance.php(89): require_once(string)
26#12 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Wikibase/lib/maintenance/populateSitesTable.php(124): require_once(string)
27#13 /srv/mediawiki/multiversion/MWScript.php(101): require_once(string)
28#14 {main}
29-----------------------------------------------------------------
30aawiktionary
31-----------------------------------------------------------------
32[4e7da88936d0421cc1f42097] [no req] MWException from line 505 of /srv/mediawiki/php-1.35.0-wmf.34/includes/cache/localisation/LocalisationCache.php: No localisation cache found for English. Please run maintenance/rebuildLocalisationCache.php.
33Backtrace:
34#0 /srv/mediawiki/php-1.35.0-wmf.34/includes/cache/localisation/LocalisationCache.php(363): LocalisationCache->initLanguage(string)
35#1 /srv/mediawiki/php-1.35.0-wmf.34/includes/cache/localisation/LocalisationCache.php(372): LocalisationCache->loadItem(string, string)
36#2 /srv/mediawiki/php-1.35.0-wmf.34/includes/cache/localisation/LocalisationCache.php(304): LocalisationCache->loadItem(string, string)
37#3 /srv/mediawiki/php-1.35.0-wmf.34/includes/language/LanguageFallback.php(106): LocalisationCache->getItem(string, string)
38#4 /srv/mediawiki/php-1.35.0-wmf.34/includes/language/LanguageFactory.php(167): MediaWiki\Languages\LanguageFallback->getAll(string)
39#5 /srv/mediawiki/php-1.35.0-wmf.34/includes/language/LanguageFactory.php(114): MediaWiki\Languages\LanguageFactory->newFromCode(string)
40#6 /srv/mediawiki/php-1.35.0-wmf.34/includes/ServiceWiring.php(212): MediaWiki\Languages\LanguageFactory->getLanguage(string)
41#7 /srv/mediawiki/php-1.35.0-wmf.34/includes/libs/services/ServiceContainer.php(451): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
42#8 /srv/mediawiki/php-1.35.0-wmf.34/includes/libs/services/ServiceContainer.php(419): Wikimedia\Services\ServiceContainer->createService(string)
43#9 /srv/mediawiki/php-1.35.0-wmf.34/includes/MediaWikiServices.php(605): Wikimedia\Services\ServiceContainer->getService(string)
44#10 /srv/mediawiki/php-1.35.0-wmf.34/includes/Setup.php(693): MediaWiki\MediaWikiServices->getContentLanguage()
45#11 /srv/mediawiki/php-1.35.0-wmf.34/maintenance/doMaintenance.php(89): require_once(string)
46#12 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Wikibase/lib/maintenance/populateSitesTable.php(124): require_once(string)
47#13 /srv/mediawiki/multiversion/MWScript.php(101): require_once(string)
48#14 {main}
49-----------------------------------------------------------------
50abwiki
51-----------------------------------------------------------------
52abwiki: done.
53-----------------------------------------------------------------
54abwiktionary
55-----------------------------------------------------------------
56

So I'll file a ticket and it looks like this is stalled on that error for now..

Is InterwikiSorter not needed in production anymore, then?

Is InterwikiSorter not needed in production anymore, then?

I don't believe so, sounds like it can be undeployed! woo!

I believe the script run has been done as part of T253756#6170109

Interwiki links can now be added to Wikidata so I think this task is now done