Page MenuHomePhabricator

direct access statements show empty string for linked data items
Closed, ResolvedPublic

Description

On a private mediawiki/wikibase instance I've managed to update the sites table and I am able to set sitelinks via Special:SetSiteLink. These sitelinks are shown on the item page.
It seems that the corresponding mediawiki page does not know about these sitelinks:

Any idea, where I can look for further infos about what is going wrong?

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald Transcript

No page seems to know the sitelink. A null-edit does not help. The page_props table is empty for these page_id.
Is there a possibility to rebuild the page_props?

When setting the sitelink via pywikibot, the page_props table does not get changed as well.

Maybe the jobs are not being ran, Have you run maintaince/runJobs.php?

Ah, thanks for the hint. There is a problem with the job queue on our, but it might take some days until the queued jobs are done. I did not notice, that had to take care of the runJobs.php on my own.

Therefore I tried it with a fresh installation of containerized wikibase and after finishing the jobs queue, the page knew about the linked item. I've attached the code for populating the sites table with values, valid for the docker-compose.yml setup. It can be executed with the maintenance/eval.php script.

This clears the sites table, before adding the local site.

$sites = [];
$langCode = 'en';
$site = new MediaWikiSite();
$site->setGlobalId( 'my_wiki' );
$site->setGroup( 'wikipedia' );
$site->setLanguageCode( $langCode );
$site->addInterwikiId( $langCode );
$site->addNavigationId( $langCode );
$site->setPath( MediaWikiSite::PATH_PAGE, "http://localhost:8181/wiki/$1" );
$site->setPath( MediaWikiSite::PATH_FILE, "http://wikibase.svc/w/$1" );
$sites[] = $site;
$sitesTable = MediaWiki\MediaWikiServices::getInstance()->getSiteStore();
$sitesTable->clear();
$sitesTable->saveSites( $sites );

That's also important, otherwise it can't understand the repo. Should we call this resolved then?

Bcbussche claimed this task.