Page MenuHomePhabricator

Handle exception in LangLinkHandler when sites not found
Closed, ResolvedPublic

Description

Currently, the client fails hard with an exception if the sites table is empty or a site not found.

Exception from line 463 of
/data/project/apache/common-local/php-master/extensions/Wikibase/client/includes/LangLinkHandler.php:
Unable to resolve site ID 'enwiki'!

We need to handle this more gracefully and at the same time log it in a prominent way that we are sure to be notified and aware.

An unknown site id could happen, for example, if there is a new wikipedia added and the sites data is not synched fully yet across the clients and repo, among other plausible scenarios.


Version: master
Severity: major

Details

Reference
bz50729

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:42 AM
bzimport set Reference to bz50729.
aude created this task.Jul 4 2013, 9:30 AM

Change 74829 had a related patch set uploaded by Aude:
(bug 50729, bug 51699) handle exception in the langlinkhander

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

Change 74829 merged by jenkins-bot:
(bug 50729, bug 51699) handle exception in the langlinkhander

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

That apparently fixed the wiki creation stack trace I had in bug 51699.

Change 75369 had a related patch set uploaded by Aude:
(bug 50729, bug 51699) handle exception in the langlinkhander

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

Change 75369 merged by Aude:
(bug 50729, bug 51699) handle exception in the langlinkhander

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

Change 75371 had a related patch set uploaded by Aude:
(bug 50729, bug 51699) handle exception in the langlinkhander

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

Change 75371 merged by Hoo man:
(bug 50729, bug 51699) handle exception in the langlinkhander

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

That fixed the addWiki issue I was encountering so I guess we are fine now.

Verified in Wikidata demo July 31th.