Page MenuHomePhabricator

Create sitelink is broken - lookup for current site is wrong
Closed, DuplicatePublic


Seems like adding sitelink from Wikibase client (aka Wikipedia) is broken - it looks up for wrong current site (for example hewiki thinks it is jawiktionary) and it isn't possible to link to other site.

How to reproduce

  1. Go to page not connected to item such as:יעקב_טולידאנו_(קהלת_יעקב)?uselang=en
  2. Press "add links"
  3. in the site field fill enwiki - note it will suggest enwiktionary (not enwiki)

root cause
I couldn't determine the exact root cause, but quick debug point to


and specifically this line: config = require( './config.json' ).currentSite

returns wrong site. (maybe not deterministic - but at least once I saw jawiktionary instead of hewiki)

I'm not sure what "require" points to - and whether this is just site configuration or code issue - so I'm adding all the suspects as tags

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Krinkle @hoo - digging further in wikibase source - the module registeration in Wikibase uses packageFiles and callback which I'm not that familiar with.
Anyhow the callback function getSiteConfiguration in ClientHooks.php of wikibase uses cache... Do you have any suggestion what could explain it?