Page MenuHomePhabricator

Undefined index in WikibaseClient $this->getRepositoryDefinitions()->getDatabaseNames()['']
Closed, ResolvedPublic

Description

After pulling up a new vagrant box with the wikidata role and visiting the main page of the default wiki (dev.wiki.local.wmftest.net) I get Notice: Undefined index: in /vagrant/mediawiki/extensions/Wikibase/client/includes/WikibaseClient.php on line 543. That line is in WikibaseClient::getStore and contains $this->getRepositoryDefinitions()->getDatabaseNames()['']. The getDatabaseNames call returns an empty array as the database for the empty string repository is null, and there is an is_null filter preventing that from getting in the result. The null value does not seem unexpected, client/config/WikibaseClient.default.php has

// Use false (meaning the local wiki's database) if this wiki is the repo,
// otherwise default to null (meaning we can't access the repo's DB directly).
'repoDatabase' => $settings->getSetting( 'thisWikiIsTheRepo' ) ? false : null,

Presumably introduced by rEWBAf9e431c26c06: Integrate all Client's repository settings into a single setting.

Event Timeline

Tgr created this task.Feb 21 2018, 3:39 AM
Restricted Application added a project: Wikidata. · View Herald TranscriptFeb 21 2018, 3:39 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
hoo added a subscriber: hoo.Feb 23 2018, 10:04 AM

@Tgr, how old is this Vagrant box you are using? I suspect the error might already be fixed via https://gerrit.wikimedia.org/r/410133. Can you please have a look?

Tgr added a comment.EditedFeb 23 2018, 5:56 PM

It was set up on Feb 19 and then vagrant git-update-d yesterday; that patch is already included.

Change 414634 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/Wikibase@master] Fix handling of null values in RepositoryDefinitions

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

Change 414635 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/vagrant@master] Unbreak wikidata role

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

Change 414634 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Fix handling of null values in RepositoryDefinitions

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

Change 414635 merged by jenkins-bot:
[mediawiki/vagrant@master] Unbreak wikidata role

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

Tgr closed this task as Resolved.Feb 27 2018, 2:02 AM
Tgr claimed this task.

Fixed by the vagrant patch, although it could use the eye of someone who actually knows how Wikibase config variables are used.