Jump to content

Extension talk:Wikibase Client

Add topic
From mediawiki.org
Latest comment: 6 months ago by Till Kraemer in topic Dynamic tables with Wikibase


Making it avalible for Mediawiki 1.19.0

[edit]

Hi could you make this extension also avalible for Mediawiki 1.19.0 please 86.171.33.224 18:39, 7 May 2013 (UTC)Reply

This is not possible because it needs the content handler which has only been introduced later. Lydia Pintscher (WMDE) (talk) 09:23, 8 May 2013 (UTC)Reply

Extension:Wikibase Client

[edit]

Please change the snapshot taken from Extension:Wikibase and move it to Extension:Wikibase Client and keep that snapshot for Extension:Wikibase 86.171.33.224 18:48, 7 May 2013 (UTC)Reply

Wikibase Client installation

[edit]

I installed wikibase lib and client Configured as follows $wgWBSettings['repoUrl'] = '//www.wikidata.org'; $wgWBSettings['repoScriptPath'] = '/mediawiki'; $wgWBSettings['repoArticlePath'] = '/mediawiki/$1'; $wgWBSettings['siteGlobalID'] = 'mywiki'; $wgWBSettings['repoDatabase'] = 'mwikidb'; $wgWBSettings['changesDatabase'] = 'mywikidb';

I tried to get a property from repoUrl with:

but nothing happen .

Some hints how to configure or use wikidata in mywiki ?

Regards g 77.56.48.49 16:40, 17 August 2013 (UTC)Reply

Do you have Wikibase Repo enabled somewhere? Wikibase Client cannot access wikidata.org, except for within wikimedia servers where the wikidata clients (e.g. wikipedia) are able to access the wikidata database directly. If you have your own Wikibase Repo instance, then update repoUrl and double check the repoDatabase setting (e.g. do you really intend it to be different from changesDatabase?). Cheers. Katie Filbert (WMDE) (talk) 11:06, 19 August 2013 (UTC)Reply
I was thinking it should be possible to have the client only as reader, to access
the wikidata data.
FYI:
I defined my own Wikibase Repo and it was working, but this was not the original goal,
Thanks g 77.56.48.49 20:41, 21 August 2013 (UTC)Reply
A third-party client like you want to do it is not possible yet. Lydia Pintscher (WMDE) (talk) 09:06, 22 August 2013 (UTC)Reply
It should not be far off... Maybe we ought to provide a list of things not working yet. This is all I can think off, and those are just guesses as I'm not up to speed with client state:
  • No change propagation system usable by non-WMF available yet, would need custom coding/setup from third party side at present
  • Not able to write back to repo due to cross domain request policies messing with API requests (this one I'm really not sure about)
Anything else? Jeroen De Dauw (talk) 20:06, 22 August 2013 (UTC)Reply
Is it possible now? Or not yet? I would like to access to Wikidata data from an external wiki. Is there any workaround? Thanks. Emijrp (talk) 14:34, 8 July 2015 (UTC)Reply
It's not possible yet and to be honest there are a ton of more important things we need to do before we get to this  :/ Lydia Pintscher (WMDE) (talk) 14:54, 9 July 2015 (UTC)Reply
It's been a while. Is this possible yet? Ike Hecht 21:55, 8 February 2019 (UTC)Reply
Is it possible now? Or not yet? Jmkim dot com (talk) 09:45, 13 March 2021 (UTC)Reply

Database tables

[edit]

It would be useful if the extension(s) page(s) documented the database tables they use: Wikibase/Installation mentions "sites" and "interwikI" incidentally, but that's not useful.

In particular, I'm interested in knowing whether the repository's ID for the client's pages are stored in a database table, and if yes which and in what format. Nemo 11:11, 5 October 2014 (UTC)Reply

Error readapidenied between private clients

[edit]

I installed a Wikibase repo and 2 clients (all private) but the queries of wikibase between the wikis don't work.

You can see the error when myfrwiki calls a query to myenwiki (event JS in the field page in the popup "Link with page")

/**/jQuery111107420199392363429_1416306133780({
  "error": {
      "code": "readapidenied",
      "info": "You need read permission to use this module",
      "*": "See https://en.xxxxx.fr/w/api.php for API usage"
  }


})

I use the parameters for the family wiki and it works :

  • $wgCrossSiteAJAXdomains = array( "en.xxxxx.fr", "fr.xxxxx.fr", "pool.xxxxx.fr" );
  • $wgSharedDB = "mydbpool";
  • $wgCookieDomain = ".xxxxx.fr";
  • $wgSharedTables[] = "ipblocks";
  • $wgSharedTables[] = "interwiki";

Can you help me ? Thanks Karima Rafes (talk) 11:50, 18 November 2014 (UTC)Reply

I don't know what the issue is here, though want to caution you against using the Wikibase software at present. IMO it is not ready for third party production usage. Jeroen De Dauw (talk) 06:41, 1 December 2014 (UTC)Reply

Wikibase? Wikibase Client? Wikidata build? huh? what?

[edit]
As I understand it
  • Wikibase = awesome technology
  • Wikidata = site running that technology to provide millions of facts about items on Wikimedia projects
  • Wikibase Client = lighterweight code for other wikis in the cluster that want to use facts from wikidata.
None of this is apparent wondering around
Meanwhile this page has
{{TNT|Update}} {{TNT|Expand|reason=looks like something added to wrong page}}
but this extension is not obsolete, it's in use on tons of Wikimedia wikis (but not mediawiki.org).
I think
I still can't figure out what Wikibase Client is. SPage (WMF) (talk) 21:27, 2 April 2015 (UTC)Reply
I'd guess Wikibase Client is this.
http://comments.gmane.org/gmane.org.wikimedia.wikidata/5353 is related. Ricordisamoa 18:14, 3 April 2015 (UTC)Reply
Wikibase Client was a separate extension, hosted at https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/WikibaseClient. But this separate code repository was abandoned and Wikibase Client became a directory in Extension:Wikibase Repository. The separate documentation on this page is not fully up to date since then. The plan is to separate the two extensions again. Thiemo Kreuz (WMDE) 13:13, 29 March 2016 (UTC)Reply

I don't know why it doesn't work

[edit]

I tried to install the wikibase client.

I obviously failed because on my wiki a message displays "access to the database impossible".

This is what I wrote in the localsettings:

require_once "$IP/extensions/Wikibase/client/WikibaseClient.php";
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
$wgEnableWikibaseRepo = false;
$wgEnableWikibaseClient = true;
$wgWBClientSettings['repoUrl'] = 'http://data.sigma.wiki';
$wgWBClientSettings['repoScriptPath'] = '';
$wgWBClientSettings['repoArticlePath'] = '/$1';
$wgWBClientSettings['siteGlobalID'] = 'frwiki';
$wgWBClientSettings['repoDatabase'] = 'brnathan_mw3';
$wgWBClientSettings['changesDatabase'] = 'brnathan_mw3';</pre>
I have the following error in the errorlog: 

"PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/imagick.so' - libMagickWand.so.2: cannot open shared object file: No such file or directory in Unknown on line 0"

and

"PHP Fatal error:  Class 'Wikibase\Lib\Serializers\ForbiddenSerializer' not found in /home/brnathan/public_html/fr/extensions/Wikibase/client/includes/WikibaseClient.php on line 635"

Regards, Brunner Nathan [[Special:Contributions/86.111.136.182|86.111.136.182]] ([[User talk:86.111.136.182|talk]]) 20:34, 28 March 2016 (UTC)
:* The first error is about a missing or broken [http://php.net/manual/en/book.imagick.php ImageMagick extension], which is neither part of Wikibase nor MediaWiki.
:* The error about the missing class means your includes are not complete. Always add the line <code>require_once "$IP/extensions/Wikibase/repo/Wikibase.php";</code> even if you want Repo to be disabled.
:* Note that this configuration requires your Client and the Repo you want to access to run on the same machine. Client must have access to the Repo's database.
:* <code>repoScriptPath</code> should not be an empty string. [[User:Thiemo Kreuz (WMDE)|Thiemo Kreuz (WMDE)]] 13:21, 29 March 2016 (UTC)

== Property not found ==

Hi, after upgrading to MediaWiki 1.28.0, I'm getting the following error when I use <code>{{#property:P1|from=Q3}}</code> in an article:

<pre>Failed to render property P1: Property not found for label 'P1' and language 'en'</pre>

Property P1 used to show an URL (official website) and is still available in the data repository.

Client's LocalSettings.php:

<pre>$wgEnableWikibaseRepo = false;
$wgEnableWikibaseClient = true;
$wmgUseWikibaseRepo = false;
$wmgUseWikibaseClient = true;
require_once __DIR__ . "/extensions/Wikidata/Wikidata.php";

$GLOBALS['wgWBClientSettings']['siteGlobalID'] = "enwiki";

$wgWBClientSettings['repoUrl'] = 'https://data.domain.com';
$wgWBClientSettings['repoScriptPath'] = '/w';
$wgWBClientSettings['repoArticlePath'] = '/wiki/$1';
$wgWBClientSettings['siteGlobalID'] = 'enwiki';
$wgWBClientSettings['repoDatabase'] = 'datawiki';
$wgWBClientSettings['changesDatabase'] = 'datawiki';
$wgWBClientSettings['repoSiteId'] = 'datawiki';
$wgWBClientSettings['repoSiteName'] = 'Myprojectname';
$wgWBClientSettings['siteLinkGroup'] = 'myprojectname';
$wgWBClientSettings['siteGroup'] = 'myprojectname';
$wgWBClientSettings['sort'] = 'code';</pre>

Repository's LocalSettings.php:

<pre>$wgEnableWikibaseRepo = true;
$wgEnableWikibaseClient = false;
$wmgUseWikibaseRepo = true;
$wmgUseWikibaseClient = false;
require_once __DIR__ . "/extensions/Wikidata/Wikidata.php";
require_once __DIR__ . "/extensions/Wikidata/extensions/Wikibase/repo/ExampleSettings.php";

$baseNs = 100;
define( 'WB_NS_PROPERTY', $baseNs + 2 );
define( 'WB_NS_PROPERTY_TALK', $baseNs + 3 );
$wgExtraNamespaces[WB_NS_PROPERTY] = 'Property';
$wgExtraNamespaces[WB_NS_PROPERTY_TALK] = 'Property_talk';
$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_ITEM] = NS_MAIN; 
$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_PROPERTY] = WB_NS_PROPERTY;
define( 'WB_NS_QUERY', $baseNs + 4 );
define( 'WB_NS_QUERY_TALK', $baseNs + 5 );
$wgExtraNamespaces[WB_NS_QUERY] = 'Query';
$wgExtraNamespaces[WB_NS_QUERY_TALK] = 'Query_talk';
$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_QUERY] = WB_NS_QUERY;
$wgWBRepoSettings['changesDatabase'] = 'datawiki';
$wgWBRepoSettings['conceptBaseUri'] = 'https://data.domain.com/wiki/';
$wgWBRepoSettings['localClientDatabases'] = array( 'dewiki', 'enwiki' );</pre>

I also tried to use <code>wfLoadExtension( 'Wikidata' );</code> in the LocalSettings.php files, but that didn't work at all.

Logfile:

<pre>[...]

[Wikibase\SettingsArray] getSetting: setting thisWikiIsTheRepo was given as a closure, resolve it to false
[Wikibase\SettingsArray] getSetting: setting repoNamespaces was given as a closure, resolve it to array (
'item' => '',
'property' => 'Property',
)
Fully initialised

[...]

[Wikibase\SettingsArray] getSetting: setting entityNamespaces was given as a closure, resolve it to array (
'item' => 0,
'property' => 120,
)
Unstubbing $wgLang on call of $wgLang::getCode from Wikibase\Client\WikibaseClient::getDefaultValueFormatterBuilders

[...]

[Wikibase\SettingsArray] getSetting: setting repoConceptBaseUri was given as a closure, resolve it to 'https://data.domain.com/entity/'
[Wikibase\Lib\Store\WikiPageEntityRevisionLookup] getEntityRevision: Looking up entity Q3 (revision 0).
[DBConnection] LoadBalancer::openForeignConnection: opened new connection for 0/datawiki
[DBConnection] LoadBalancer::reuseConnection: freed connection 0/datawiki
[Wikibase\Lib\Store\WikiPageEntityRevisionLookup] loadEntityBlob: Calling getRevisionText() on revision 16630
[DBConnection] LoadBalancer::openForeignConnection: reusing free connection 0/datawiki
[DBConnection] LoadBalancer::reuseConnection: freed connection 0/datawiki

[...]</pre>

I don't really understand the <code>https://data.domain.com/entity/</code> part, since the URL of an item actually looks like this: <code>https://data.domain.com/wiki/Q3</code> ...and a property looks like this: <code>https://data.domain.com/wiki/Property:P1</code>.

Any help is more than welcome! Thanks and cheers! [[User:Till Kraemer|Till Kraemer]] ([[User talk:Till Kraemer|talk]]) 19:35, 3 December 2016 (UTC)
:I'm afraid there is not enough information to fully understand the problem. If it worked before but stopped working after an update it must be something we updated in the code base, but you did not updated in your configuration. Please have a look at the example configuration in <code>Wikibase.example.php</code>. The <code>entityNamespaces</code> setting changed a bit. I also wonder if you checked your Q3 item. Are you sure it contains a statement for the property P1? [[User:Thiemo Kreuz (WMDE)|Thiemo Kreuz (WMDE)]] 13:54, 5 December 2016 (UTC)
:{{FlowMention|Thiemo Mättig (WMDE)}}, thanks for your help!
:In <code>Wikibase.example.php</code>, I set <code>$wgWBRepoSettings['siteLinkGroups'] = [ 'myprojectname' ];</code> and <code>$wgWBRepoSettings['specialSiteLinkGroups'] = [ 'pool', 'data' ];</code> like I used to do.
:I now changed <code>$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_ITEM] = NS_MAIN;</code> to <code>$wgWBRepoSettings['entityNamespaces']['item'] = NS_MAIN;</code> and <code>$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_PROPERTY] = WB_NS_PROPERTY;</code> to <code>$wgWBRepoSettings['entityNamespaces']['property'] = WB_NS_PROPERTY;</code> in <code>LocalSettings.php</code>, since it looks to me like this is the current way to do this (by the way, should this be updated [[Extension:Wikibase_Repository#Setting_up_items_in_the_main_namespace|here]] or is it still up-to-date?). 
:I'm still getting the old "Property not found" error though. P1 is actually still in the statements section of Q3. It used to work before, but I checked it anyway like a million times :) Cheers! [[User:Till Kraemer|Till Kraemer]] ([[User talk:Till Kraemer|talk]]) 15:43, 6 December 2016 (UTC)

== Javascript: wikibase is not defined ==

After enabling the Wikibase client, I was hoping to be able to use the <code>wikibase.client</code> javascript resources, but it seems they're not being loaded: <code>wikibase is not defined</code>

Can anyone tell me where I've gone wrong? I've tried to follow all the installation instructions. [[User:Samwilson|Sam]] [[User_talk:Samwilson|Wilson]] 03:20, 23 February 2017 (UTC)
:Have you used <code>mw.loader.using('wikibase.client.X', ...)</code>? Otherwise it will be loaded only if used by another module. [[User:Tacsipacsi|Tacsipacsi]] ([[User talk:Tacsipacsi|talk]]) 21:30, 24 February 2017 (UTC)

== Error installing Extension:Wikibase ==

Hi Everybody,

in advance, thankyou for reading me.

I want to install the extension: wikibase, since I need it in order to use Template:Infobox person .

I copy the extension folder into wiki/extension/ folder, and I copy the following lines to the LocalSettings.php file, as it is recommended in the installation guide.

$wgEnableWikibaseRepo = false;

$wgEnableWikibaseClient = true;

require_once "$IP/extensions/Wikibase/client/WikibaseClient.php";

require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";

And still I am getting the error message: Sorry, we have problems. Cannot acces the database.

What can I do?

Thankyou for your attention,

Jordi [[User:Benet tallaferro|Benet tallaferro]] ([[User talk:Benet tallaferro|talk]]) 23:06, 19 May 2017 (UTC)
:What exactly do you want to achieve? I assume you copied the code of [[:en:Template:Infobox person]] to a local MediaWiki installation you own? Is this correct? Do you want to use data from wikidata.org in this template, or from your own Wikibase Repo? Note that the Wikibase Client software currently needs direct database access to the Repo. Both must run on the same server because of this. [[User:TMg|TMg]] 09:23, 20 May 2017 (UTC)
:If you have database problems, it probably means that you haven’t run <code>[[Special:MyLanguage/Template:Extension#needs-updatephp|update.php]]</code>. [[User:Tacsipacsi|Tacsipacsi]] ([[User talk:Tacsipacsi|talk]]) 10:08, 20 May 2017 (UTC)

== Split ==

{{FlowMention|Tobias Gritschacher (WMDE) }}, thank you for improving the documentation and moving advanced details into their own page. However, I think the last changes in this page is hiding important basic information that should appear here. For example: how to use #property is now located in [[Wikibase/Installation/Advanced configuration]]. Also,  the last changes break the " parser functions" link in the intro. Can you please fix it? Thanks [[User:ערן|Eran]] ([[User talk:ערן|talk]]) 06:11, 26 May 2017 (UTC)

== about{{#property:P856}} ==
{{Archive top|result={{Tracked|T166429}}|status=resolved}}

I put this into the article on zh.wp. And I found that it outputs a incomplete code-block of Language Converter.

like [[:w:zh:新浪微博]] , it outputed that '<code>http://www.weibo.com">http://www.weibo.com;zh-hans:http://www.weibo.com;zh-hant:http://www.weibo.com;zh-cn:http://www.weibo.com;zh-hk:http://www.weibo.com;zh-mo:http://www.weibo.com;zh-sg:http://www.weibo.com;zh-tw:http://www.weibo.com;}-</code>'

But I use Special:ExpandTemplates to parse it, it's output is clean, just 'http://www.weibo.com'.

[[:meta:Tech/News/2016/41]]has a news about 'Language converter syntax will soon no longer work inside external links.' , Is it about this problem? And I can't find the function of {{#property:}} in the source code of Wikibase, so I want to know whether it have a i18n Mediawiki-namespace page to control it ,or a hard code to format the output of URL with Language Converter? [[User:Cwek|Cwek]] ([[User talk:Cwek|talk]]) 02:23, 27 May 2017 (UTC)
:I suggest you to report it on Phabricator, the bug tracker of Wikimedia, as I’m not sure if any developer is watching this page, and there you can tag both Wikidata and Language Converter so that developers of both products will notice it. Wikidata bugs can be reported [[phab:tag/wikidata|here]] (you can easily create a Phabricator account with your existing Wikimedia account). [[User:Tacsipacsi|Tacsipacsi]] ([[User talk:Tacsipacsi|talk]]) 09:20, 27 May 2017 (UTC)
:Thanks, I will. [[User:Cwek|Cwek]] ([[User talk:Cwek|talk]]) 09:42, 27 May 2017 (UTC)
{{Archive bottom}}

== Template displaying {{#statements:Pxxx}} ==

After upgrading my site: http://www.hattebol.no/index.php?title=Forside to 1.28.2, my template:infobox person stopped working. So I installed Wikibase Client and repository and created the seemingly missing Properties. Still I can't get rid of the display of the missing parameters in the template. See http://www.hattebol.no/index.php?title=Mal%3AInfoboks_biografi [[User:OlePedia|OlePedia]] ([[User talk:OlePedia|talk]]) 23:46, 4 July 2017 (UTC)
:At this point Wikibase requires more up-to-date code than MediaWiki 1.28.2. Have you tried installing the latest code from git? [[User:Lydia Pintscher (WMDE)|Lydia Pintscher (WMDE)]] ([[User talk:Lydia Pintscher (WMDE)|talk]]) 08:39, 5 July 2017 (UTC)
:Lydia,
:I have now tried ver. 1.29.0 and 1.30.0-alpha (from Git) with the same result. [[User:OlePedia|OlePedia]] ([[User talk:OlePedia|talk]]) 23:11, 23 July 2017 (UTC)

== Cannot access the database after upgrade to MediaWiki 1.31.0 ==

Hi, I just upgraded to MediaWiki 1.31.0. My repo works fine, however, when I try to load an article on the client wiki, I get the following error: <pre>Sorry! This site is experiencing technical difficulties.

Try waiting a few minutes and reloading.

(Cannot access the database)

Backtrace:

#0 /path/to/mywikis/pool/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1134): Wikimedia\Rdbms\Database->reportConnectionError('Unknown databas...')
#1 /path/to/mywikis/pool/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(749): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#2 /path/to/mywikis/pool/w/includes/dao/DBAccessBase.php(64): Wikimedia\Rdbms\LoadBalancer->getConnection(0, Array, 'repo')
#3 /path/to/mywikis/pool/w/extensions/Wikibase/lib/includes/Store/Sql/SiteLinkTable.php(221): DBAccessBase->getConnection(-1)
#4 /path/to/mywikis/pool/w/extensions/Wikibase/lib/includes/Store/CachingSiteLinkLookup.php(147): Wikibase\Lib\Store\Sql\SiteLinkTable->getItemIdForLink('poolwiki', 'Main Page')
#5 /path/to/mywikis/pool/w/extensions/Wikibase/lib/includes/Store/CachingSiteLinkLookup.php(75): Wikibase\Lib\Store\CachingSiteLinkLookup->getAndCacheItemIdForLink('poolwiki', 'Main Page')
#6 /path/to/mywikis/pool/w/extensions/Wikibase/client/includes/LangLinkHandler.php(101): Wikibase\Lib\Store\CachingSiteLinkLookup->getItemIdForLink('poolwiki', 'Main Page')
#7 /path/to/mywikis/pool/w/extensions/Wikibase/client/includes/LangLinkHandler.php(331): Wikibase\Client\LangLinkHandler->getEntityLinks(Object(Title))
#8 /path/to/mywikis/pool/w/extensions/Wikibase/client/includes/LangLinkHandler.php(352): Wikibase\Client\LangLinkHandler->getEffectiveRepoLinks(Object(Title), Object(ParserOutput))
#9 /path/to/mywikis/pool/w/extensions/Wikibase/client/includes/Hooks/ParserOutputUpdateHookHandlers.php(97): Wikibase\Client\LangLinkHandler->addLinksFromRepository(Object(Title), Object(ParserOutput))
#10 /path/to/mywikis/pool/w/extensions/Wikibase/client/includes/Hooks/ParserOutputUpdateHookHandlers.php(65): Wikibase\Client\Hooks\ParserOutputUpdateHookHandlers->doContentAlterParserOutput(Object(Title), Object(ParserOutput))
#11 /path/to/mywikis/pool/w/includes/Hooks.php(177): Wikibase\Client\Hooks\ParserOutputUpdateHookHandlers::onContentAlterParserOutput(Object(WikitextContent), Object(Title), Object(ParserOutput))
#12 /path/to/mywikis/pool/w/includes/Hooks.php(205): Hooks::callHook('ContentAlterPar...', Array, Array, NULL)
#13 /path/to/mywikis/pool/w/includes/content/AbstractContent.php(520): Hooks::run('ContentAlterPar...', Array)
#14 /path/to/mywikis/pool/w/includes/poolcounter/PoolWorkArticleView.php(144): AbstractContent->getParserOutput(Object(Title), 7803, Object(ParserOptions))
#15 /path/to/mywikis/pool/w/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#16 /path/to/mywikis/pool/w/includes/page/Article.php(604): PoolCounterWork->execute()
#17 /path/to/mywikis/pool/w/includes/actions/ViewAction.php(68): Article->view()
#18 /path/to/mywikis/pool/w/includes/MediaWiki.php(500): ViewAction->show()
#19 /path/to/mywikis/pool/w/includes/MediaWiki.php(294): MediaWiki->performAction(Object(Article), Object(Title))
#20 /path/to/mywikis/pool/w/includes/MediaWiki.php(861): MediaWiki->performRequest()
#21 /path/to/mywikis/pool/w/includes/MediaWiki.php(524): MediaWiki->main()
#22 /path/to/mywikis/pool/w/index.php(42): MediaWiki->run()
#23 {main}

The local database can be accessed perfectly, special pages like recent changes or user contributions show up properly, but somehow the repo database can't be accessed anymore :/

Any ideas are more than appreciated! Thanks and cheers! Till Kraemer (talk) 18:18, 7 August 2018 (UTC)Reply

Did you made sure to run the update.php maintenance script on both the repo and the client database? Thiemo Kreuz (WMDE) 03:18, 13 August 2018 (UTC)Reply
Hi @Thiemo Kreuz (WMDE), thanks for your reply! Yeah, I ran the update script and I just did it again, just to make sure. Same error :/ With older MediaWiki versions I used the Wikidata extension bundle, but it seems to be discontinued. This time, I installed Wikibase using Composer as suggested.
I just noticed that Wikipedia uses WikimediaBadges and WikibaseLexeme, so I wanted to install them too, just in case. Wasn't able to install WikibaseLexeme on the client wiki though. Showed me a blank page.
The LocalSettings.php on the client wiki looks like this:
# Wikibase Extension
$wgEnableWikibaseRepo = false;
$wgEnableWikibaseClient = true;
#$wmgUseWikibaseRepo = false;
#$wmgUseWikibaseClient = true;
#require_once __DIR__ . "/extensions/Wikidata/Wikidata.php";
#require_once __DIR__ . "/extensions/Wikidata/extensions/Wikibase/repo/ExampleSettings.php";
require_once "$IP/extensions/Wikibase/client/WikibaseClient.php";
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
#require_once "$IP/extensions/Wikibase/repo/Wikibase.php";
#require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php";
# Settings
$wgWBClientSettings['repoUrl'] = 'https://data.mywiki.com';
$wgWBClientSettings['repoScriptPath'] = '/w';
$wgWBClientSettings['repoArticlePath'] = '/wiki/$1';
$wgWBClientSettings['siteGlobalID'] = 'enwiki';
$wgWBClientSettings['repoDatabase'] = 'datawiki';
$wgWBClientSettings['changesDatabase'] = 'datawiki';
#$wgWBClientSettings['siteLinkGroups'] = 'mywiki';
$wgWBClientSettings['repoSiteId'] = 'datawiki';
$wgWBClientSettings['repoSiteName'] = 'MyWiki';
$wgWBClientSettings['siteLinkGroup'] = 'mywiki';
# Optional
#$wgWBClientSettings['repoNamespaces'] = array(
#	'wikibase-item' => 'Item', //leave empty if items are in the main namespace
#	'wikibase-property' => 'Property'
#);
$wgWBClientSettings['siteGroup'] = 'mywiki'; //you probably don't need this one, but do if your siteGroup is different from 'wikipedia'
# WikimediaBadges Extension
wfLoadExtension( 'WikimediaBadges' );
# WikibaseLexeme Extension
#wfLoadExtension( 'WikibaseLexeme' );
I also noticed that on Wikidata the client is also activated. Did that for my repo too, left $wgEnableWikibaseClient = false; untouched though.
The LocalSettings.php on the repo looks like this:
# Wikibase Extension
$wgEnableWikibaseRepo = true;
$wgEnableWikibaseClient = false;
#$wmgUseWikibaseRepo = true;
#$wmgUseWikibaseClient = false;
#require_once __DIR__ . "/extensions/Wikidata/Wikidata.php";
#require_once __DIR__ . "/extensions/Wikidata/extensions/Wikibase/repo/ExampleSettings.php";
require_once "$IP/extensions/Wikibase/repo/Wikibase.php";
require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php";
require_once "$IP/extensions/Wikibase/client/WikibaseClient.php";
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
$baseNs = 100;
// Define the namespace indexes
define( 'WB_NS_PROPERTY', $baseNs + 2 );
define( 'WB_NS_PROPERTY_TALK', $baseNs + 3 );
 
// Define the namespaces
$wgExtraNamespaces[WB_NS_PROPERTY] = 'Property';
$wgExtraNamespaces[WB_NS_PROPERTY_TALK] = 'Property_talk';
 
// Assigning the correct content models to the namespaces
#$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_ITEM] = NS_MAIN; 
$wgWBRepoSettings['entityNamespaces']['item'] = NS_MAIN;
#$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_PROPERTY] = WB_NS_PROPERTY;
$wgWBRepoSettings['entityNamespaces']['property'] = WB_NS_PROPERTY;
define( 'WB_NS_QUERY', $baseNs + 4 );
define( 'WB_NS_QUERY_TALK', $baseNs + 5 );
 
$wgExtraNamespaces[WB_NS_QUERY] = 'Query';
$wgExtraNamespaces[WB_NS_QUERY_TALK] = 'Query_talk';
 
#$wgWBRepoSettings['entityNamespaces']['CONTENT_MODEL_WIKIBASE_QUERY'] = WB_NS_QUERY;
$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_QUERY] = WB_NS_QUERY;
$wgWBRepoSettings['changesDatabase'] = 'datawiki';
$wgWBRepoSettings['conceptBaseUri'] = 'https://data.mywiki.com/wiki/';
$wgWBRepoSettings['localClientDatabases'] = array( 'bgwiki', 'bnwiki', 'cswiki', 'dewiki', 'enwiki', 'eswiki', 'frwiki', 'huwiki', 'hywiki', 'itwiki', 'kawiki', 'nlwiki', 'plwiki', 'poolwiki', 'ptwiki', 'pt_brwiki', 'ruwiki', 'srwiki', 'svwiki', 'trwiki' );
# WikimediaBadges Extension
wfLoadExtension( 'WikimediaBadges' );
# WikibaseLexeme Extension
wfLoadExtension( 'WikibaseLexeme' );
I don't really know what to do right now :/ Any help is more than welcome. Thanks and cheers! Till Kraemer (talk) 15:28, 14 August 2018 (UTC)Reply
  • Please check if the MediaWiki and Wikibase versions you are using match.
  • WikimediaBadges and WikibaseLexeme are optional. If you are not sure, you probably don't need them.
  • The client's configuration format changed. Even if there is backwards-compatibility code in place, it might have failed for you for some reason. What you can try is to add the new format $wgWBClientSettings['repositories'] = …; either in addition or replacing the old $wgWBClientSettings['repoDatabase']. See WikibaseClient.example.php for an example. Thiemo Kreuz (WMDE) 08:57, 15 August 2018 (UTC)Reply
Hi @Thiemo Kreuz (WMDE), thanks for your suggestions!
I just checked the versions again. I'm running MediaWiki 1.31.0 on the clients and on the repo and the Wikibase version file looks like this:
Wikibase: REL1_31
2018-04-17T22:37:46
8178d16
I added $wgWBClientSettings['repositories'] = 'datawiki'; to LocalSettings.php, but when I run the update script, the following error appears:
[abc123567] [no req]   TypeError from line 117 of /path/to/mywikis/en/w/extensions/Wikibase/lib/includes/WikibaseSettings.php: Argument 1 passed to Wikibase\WikibaseSettings::getEntityNamespacesFromRepositorySettings() must be of the type array, string given, called in /path/to/mywikis/en/w/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 111
Backtrace:
#0 /path/to/mywikis/en/w/extensions/Wikibase/lib/includes/WikibaseSettings.php(111): Wikibase\WikibaseSettings::getEntityNamespacesFromRepositorySettings(string)
#1 /path/to/mywikis/en/w/extensions/Wikibase/lib/includes/WikibaseSettings.php(69): Wikibase\WikibaseSettings::buildEntityNamespaceConfigurations(Wikibase\SettingsArray)
#2 /path/to/mywikis/en/w/extensions/Wikibase/client/includes/Hooks/EchoSetupHookHandlers.php(43): Wikibase\WikibaseSettings::getClientSettings()
#3 /path/to/mywikis/en/w/extensions/Wikibase/client/includes/Hooks/EchoSetupHookHandlers.php(65): Wikibase\Client\Hooks\EchoSetupHookHandlers::newFromGlobalState()
#4 /path/to/mywikis/en/w/includes/Hooks.php(177): Wikibase\Client\Hooks\EchoSetupHookHandlers::onBeforeCreateEchoEvent(array, array, array)
#5 /path/to/mywikis/en/w/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
#6 /path/to/mywikis/en/w/extensions/Echo/includes/EchoHooks.php(48): Hooks::run(string, array)
#7 /path/to/mywikis/en/w/includes/Setup.php(940): EchoHooks::initEchoExtension()
#8 /path/to/mywikis/en/w/maintenance/doMaintenance.php(81): require_once(string)
#9 /path/to/mywikis/en/w/maintenance/update.php(245): require_once(string)
#10 {main}
This also happens when I remove $wgWBClientSettings['repoDatabase'] = 'datawiki';. I'm running PHP 7.0.8. Should I upgrade to 7.0.28?
Thanks and cheers! Till Kraemer (talk) 14:01, 15 August 2018 (UTC)Reply
The repositories setting is an array, as shown in the example. The empty array key '' might look confusing. This identifies the default repository, which is what you need. All you need to do is to fill in the values for repoDatabase and baseUri, I believe. Thiemo Kreuz (WMDE) 15:34, 15 August 2018 (UTC)Reply
Hi @Thiemo Kreuz (WMDE), thanks for your help!
For some reason, just adding repoDatabase and baseUri doesn't work for me. If I add this to LocalSettings.php...
$wgWBClientSettings['repositories'] = [
			'repoDatabase' => 'datawiki',
			'baseUri' => 'https://data.mywiki.com/entity',
	];
...I get the following error:
[abc1234567] [no req]   TypeError from line 120 of /path/to/mywikis/en/w/extensions/Wikibase/lib/includes/WikibaseSettings.php: Argument 2 passed to Wikibase\WikibaseSettings::Wikibase\{closure}() must be of the type array, string given
Backtrace:
#0 [internal function]: Wikibase\WikibaseSettings::Wikibase\{closure}(array, string)
#1 /path/to/mywikis/en/w/extensions/Wikibase/lib/includes/WikibaseSettings.php(123): array_reduce(array, Closure, array)
#2 /path/to/mywikis/en/w/extensions/Wikibase/lib/includes/WikibaseSettings.php(111): Wikibase\WikibaseSettings::getEntityNamespacesFromRepositorySettings(array)
#3 /path/to/mywikis/en/w/extensions/Wikibase/lib/includes/WikibaseSettings.php(69): Wikibase\WikibaseSettings::buildEntityNamespaceConfigurations(Wikibase\SettingsArray)
#4 /path/to/mywikis/en/w/extensions/Wikibase/client/includes/Hooks/EchoSetupHookHandlers.php(43): Wikibase\WikibaseSettings::getClientSettings()
#5 /path/to/mywikis/en/w/extensions/Wikibase/client/includes/Hooks/EchoSetupHookHandlers.php(65): Wikibase\Client\Hooks\EchoSetupHookHandlers::newFromGlobalState()
#6 /path/to/mywikis/en/w/includes/Hooks.php(177): Wikibase\Client\Hooks\EchoSetupHookHandlers::onBeforeCreateEchoEvent(array, array, array)
#7 /path/to/mywikis/en/w/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
#8 /path/to/mywikis/en/w/extensions/Echo/includes/EchoHooks.php(48): Hooks::run(string, array)
#9 /path/to/mywikis/en/w/includes/Setup.php(940): EchoHooks::initEchoExtension()
#10 /path/to/mywikis/en/w/maintenance/doMaintenance.php(81): require_once(string)
#11 /path/to/mywikis/en/w/maintenance/update.php(245): require_once(string)
#12 {main}
So I added the whole block:
$wgWBClientSettings['repositories'] = [
		'' => [
			'repoDatabase' => 'datawiki',
			'baseUri' => 'https://data.mywiki.com/entity',
			'entityNamespaces' => [
				'item' => WB_REPO_NS_ITEM,
				'property' => WB_REPO_NS_PROPERTY
			],
			'prefixMapping' => [ '' => '' ],
		]
	];
I was now able to run the update script successfully and the item ID links (like https://data.mywiki.com/wiki/Special:EntityPage/Q1234567) show up on the client wiki. However, the interwiki links don't appear on the client wiki and I have the following error in my log file:
PHP Warning:  Wikibase\Client\LangLinkHandler::getEntityLinks: Could not load item Q1234567 for XYZ [Called from Wiki
base\Client\LangLinkHandler::getEntityLinks in /path/to/mywikis/en/w/extensions/Wikibase/client/includes/LangLinkHandler.php at line 116] in /path/to/mywikis/en/w/includes/debug/MWDebug.php on line 309
PHP message: PHP Warning:  According to a SiteLinkLookup Q1234567 is linked to enwiki while it is not or it does not exist. [Called from Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::setBadgesProperty in /path/to/mywikis/en/w/extensions/Wikibase/client/includes/ParserOutput/ClientParserOutputDa
taUpdater.php at line 139] in /path/to/mywikis/en/w/includes/debug/MWDebug.php on line 309" while reading response header from upstream, client: 1.2.3.4, server: en.mywiki.com, request: "GET /wiki/XYZ HTTP/1.1
", upstream: "fastcgi://1.2.3.4:1234", host: "en.mywiki.com", referrer: "https://en.mywiki.com/wiki/XYZ"
Not sure what I'm missing here :/
Thanks and cheers! Till Kraemer (talk) 16:15, 16 August 2018 (UTC)Reply
Oh, I have never seen this message before. It sounds like a secondary database table got out of sync. I'm afraid I need to hand over to the core Wikidata team. Maybe Leszek can help?
PS: I just realized your item namespace is NS_MAIN, not WB_REPO_NS_ITEM. You need to fix this in the configuration you just added. Thiemo Kreuz (WMDE) 16:48, 16 August 2018 (UTC)Reply
Hi @Thiemo Kreuz (WMDE), I changed WB_REPO_NS_ITEM to NS_MAIN in LocalSettings.php as you suggested and woohoo, it works perfectly now! :) Thank you so much for your help! I'm soo happy now! :) Long live Wikibase and Thiemo Kreuz! :)
Cheers! Till Kraemer (talk) 18:24, 16 August 2018 (UTC)Reply
I wonder I can run mediaWiki 1.32 without database replication?
Alex Lai 2601:144:4100:A372:20A1:4DF9:D7DC:A349 (talk) 22:50, 17 February 2019 (UTC)Reply
Hey Alex. Is this question related to Wikibase? If not, I'm afraid this is the wrong page to ask. I'm also not sure if we are talking about the same when we say "database replication". What is the exact issue you run into? Thiemo Kreuz (WMDE) 06:50, 18 February 2019 (UTC)Reply

Need help with installing to Mediawiki 1.31

[edit]

Can somebody please post what exactly you put into your LocalSettings.php for a client only install of this extension to access wikidata.org? Thanks. Zzmonty (talk) 13:15, 31 August 2018 (UTC)Reply

What the section Wikibase/Installation#Adjust your LocalSettings.php describes should be all that's needed. Was this not successful? If not, what's missing for you? Thiemo Kreuz (WMDE) 15:30, 31 August 2018 (UTC)Reply
Tried that and nothing works. I also looked at the advanced installation, and tried to copy those items and it did not work. If you got this to work with a 1.31 mediawiki, and the client only part of this extension, if you could just look at your LocalSettings.php file and just copy everything that you have in that file related to this extension it would be much appreciated. Maybe another extension I have installed is conflicting with this extension. i don't know. I just know that i followed the instructions a couple of times, and I could not get this extension to even load.
The only other item is that I don't have composure, so I was trying to manually install the extension. Did I miss some dependency either with a third party application or else another extension? Zzmonty (talk) 20:47, 1 September 2018 (UTC)Reply
Please describe what "did not work" means. What error message do you get on which page in which namespace?
Having the libraries Wikibase depends on installed via Composer is a must. I'm not aware of a way to do this "manually". Thiemo Kreuz (WMDE) 07:40, 2 September 2018 (UTC)Reply
Then that is where the problem is, because I did not use composer. Zzmonty (talk) 17:31, 3 September 2018 (UTC)Reply

Extension not working on tr.wiktionary

[edit]

On this module, there is a line "local URL = mw.wikibase.getEntityUrl(wikidataItem)", but it won't work the way it should like its english wiktionary version. When I remove "mw.wikibase" from if condition it says "wikibase is a nil value", why is that? ~ Z (m) 14:28, 14 September 2018 (UTC)

All Wiktionaries except English don't yet have arbitrary access enabled. You can file a ticket on phabricator.wikimedia.org to get it enabled. Lydia Pintscher (WMDE) (talk) 20:10, 15 September 2018 (UTC)Reply

Automatic labels

[edit]

Can someone explain me why the title of a wiki page is not automatically used for the label of the item when a wikipedia page is added in that language from the wikipedia? It is this way by default if you create an item, but not if you only add a link to a wikipedia page. Why is that behaviour of this Wikibase Client?

Thanks in advance. Paucabot (talk) 10:59, 6 December 2018 (UTC)Reply

Usage with WikibaseMediaInfo ("Structured Data")

[edit]

Hi, I'm trying to get property value from Structured Data for File:Monument Demba et Dupont.jpg. To do this I invoke {{wikidata|P6216|from=M76359368}} (M76359368 is its id according to commons:Commons:Depicts#API_access). However, it doesn't work (error "Identifier not found"). How to properly query this information? 176.36.227.144 (talk) 10:27, 20 October 2020 (UTC)Reply

(note: I invoked that template in the context of Ukrainian Wikipedia) 176.36.227.144 (talk) 10:29, 20 October 2020 (UTC)Reply
Lua access is different from API access. Lua access is currently only possible within Commons. Tacsipacsi (talk) 19:30, 20 October 2020 (UTC)Reply
@Tacsipacsi That's sad, but I suspect there has to be plans to add Lua support (smth like WikibaseMediaInfoClient extension). Maybe you are aware of such phabricator issue or have a roadmap link (I'd subscribe to their updates)?
Also, is there any other way to query some data (not just structured data) about Commons media files from a Wikipedia module? 176.36.227.144 (talk) 20:45, 20 October 2020 (UTC)Reply
I tried to find something about the cross-wiki support (I’m pretty sure I once read that there’s no cross-wiki support yet), but I didn’t succeed.
Some very basic information (dimensions, MIME type etc.) can be queried about any (Commons or local) file using the title library. Tacsipacsi (talk) 00:41, 21 October 2020 (UTC)Reply

WDQS-UPDATER_1 keeps failing/restarting with exit code 1

[edit]

Running Wikibase based on the docker-compose.yml file on wikibase-docker repository. 7 of 8 containers are up except for the the WDQS-updater which keeps restarting with the following error. Tinyttt (talk) 04:44, 11 December 2020 (UTC)Reply

The following is from the logs:
at org.wikidata.query.rdf.tool.change.ChangeSourceContext.getStartTime(ChangeSourceContext.java:97)
at org.wikidata.query.rdf.tool.Update.initialize(Update.java:144)
at org.wikidata.query.rdf.tool.Update.main(Update.java:97)
wait-for-it.sh: waiting 300 seconds for wikibase.svc:80
wait-for-it.sh: wikibase.svc:80 is available after 0 seconds
wait-for-it.sh: waiting 300 seconds for wdqs.svc:9999
wait-for-it.sh: wdqs.sv
c:9999
is available after 0 seconds
Updating via http://wdqs.svc:9999/bigdata/namespace/wdq/sparql
OpenJDK 64-Bit Server VM warning: Cannot open file /var/log/wdqs/wdqs-updater_jvm_gc.pid10.log due to No such file or directory
#logback.classic pattern: %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
04:13:17.250 [main] INFO org.wikidata.query.rdf.tool.Update - Starting Updater 0.3.10-SNAPSHOT (8bba8bfb0bbb12361c0e214fe482fbe15fcaa129)
04:13:18.251 [main] INFO o.w.q.r.t.change.ChangeSourceContext - Checking where we left off
04:13:18.252 [main] INFO o.w.query.rdf.tool.rdf.RdfRepository - Checking for left off time from the updater
04:13:18.512 [main] INFO o.w.query.rdf.tool.rdf.RdfRepository - Found left off time from the updater
04:13:18.514 [main] ERROR org.wikidata.query.rdf.tool.Update - Error during initialization.
java.lang.IllegalStateException: RDF store reports the last update time is before the minimum safe poll time. You will have to reload from scratch or you might have missing data.
at org.wikidata.query.rdf.tool.change.ChangeSourceContext.getStartTime(ChangeSourceContext.java:97)
at org.wikidata.query.rdf.tool.Update.initialize(Update.java:144)
at org.wikidata.query.rdf.tool.Update.main(Update.java:97)
Exception in thread "main" java.lang.IllegalStateException: RDF store reports the last update time is before the minimum safe poll time. You will have to reload from scratch or you might have missing data.
at org.wikidata.query.rdf.tool.change.ChangeSourceContext.getStartTime(ChangeSourceContext.java:97)
at org.wikidata.query.rdf.tool.Update.initialize(Update.java:144)
at org.wikidata.query.rdf.tool.Update.main(Update.java:97)
wait-for-it.sh: waiting 300 seconds for wikibase.svc:80
wait-for-it.sh: wikibase.svc:80 is available after 0 seconds
wait-for-it.sh: waiting 300 seconds for wdqs.svc:9999
wait-for-it.sh: wdqs.svc:9999 is available after 0 seconds
Updating via http://wdqs.svc:9999/bigdata/namespace/wdq/sparql
OpenJDK 64-Bit Server VM warning: Cannot open file /var/log/wdqs/wdqs-updater_jvm_gc.pid10.log due to No such file or directory
#logback.classic pattern: %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
04:14:19.547 [main] INFO org.wikidata.query.rdf.tool.Update - Starting Updater 0.3.10-SNAPSHOT (8bba8bfb0bbb12361c0e214fe482fbe15fcaa129)
04:14:24.297 [main] INFO o.w.q.r.t.change.ChangeSourceContext - Checking where we left off
04:14:24.297 [main] INFO o.w.query.rdf.tool.rdf.RdfRepository - Checking for left off time from the updater
04:14:24.602 [main] INFO o.w.query.rdf.tool.rdf.RdfRepository - Found left off time from the updater
04:14:24.604 [main] ERROR org.wikidata.query.rdf.tool.Update - Error during initialization.
java.lang.IllegalStateException: RDF store reports the last update time is before the minimum safe poll time. You will have to reload from scratch or you might have missing data.
at org.wikidata.query.rdf.tool.change.ChangeSourceContext.getStartTime(ChangeSourceContext.java:97)
at org.wikidata.query.rdf.tool.Update.initialize(Update.java:144)
at org.wikidata.query.rdf.tool.Update.main(Update.java:97)
Exception in thread "main" java.lang.IllegalStateException: RDF store reports the last update time is before the minimum safe poll time. You will have to reload from scratch or you might have missing data.
at org.wikidata.query.rdf.tool.change.ChangeSourceContext.getStartTime(ChangeSourceContext.java:97)
at org.wikidata.query.rdf.tool.Update.initialize(Update.java:144)
at org.wikidata.query.rdf.tool.Update.main(Update.java:97) Tinyttt (talk) 04:44, 11 December 2020 (UTC)Reply

Get error "Failed to access name from content_models using id = 2" in Wikibase Client extension

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi

For Change siteGlobalID from es to eswiki, me empty wbc_entity_usage table

and change $wgWBClientSettings['siteGlobalID'] = 'es'; to $wgWBClientSettings['siteGlobalID'] = 'eswiki'; in LocalSettings.php file

But get following error in MW 1.35.5

[bb68aeddeebdcdff167b271c] /wiki/Main_Page Wikibase\DataModel\Services\Lookup\EntityLookupException from line 51 of /path/w/extensions/Wikibase/lib/includes/Store/RevisionBasedEntityLookup.php: Failed to access name from content_models using id = 2

Backtrace:

#0 /path/w/vendor/wikibase/data-model-services/src/Lookup/RedirectResolvingEntityLookup.php(51): Wikibase\Lib\Store\RevisionBasedEntityLookup->getEntity()
#1 /path/w/extensions/Wikibase/client/includes/Hooks/SiteLinksForDisplayLookup.php(96): Wikibase\DataModel\Services\Lookup\RedirectResolvingEntityLookup->getEntity()
#2 /path/w/extensions/Wikibase/client/includes/Hooks/SiteLinksForDisplayLookup.php(82): Wikibase\Client\Hooks\SiteLinksForDisplayLookup->getSiteLinksForItemId()
#3 /path/w/extensions/Wikibase/client/includes/Hooks/LangLinkHandler.php(269): Wikibase\Client\Hooks\SiteLinksForDisplayLookup->getSiteLinksForPageTitle()
#4 /path/w/extensions/Wikibase/client/includes/Hooks/LangLinkHandler.php(290): Wikibase\Client\Hooks\LangLinkHandler->getEffectiveRepoLinks()
#5 /path/w/extensions/Wikibase/client/includes/Hooks/ParserOutputUpdateHookHandler.php(98): Wikibase\Client\Hooks\LangLinkHandler->addLinksFromRepository()
#6 /path/w/extensions/Wikibase/client/includes/Hooks/ParserOutputUpdateHookHandler.php(80): Wikibase\Client\Hooks\ParserOutputUpdateHookHandler->doContentAlterParserOutput()
#7 /path/w/includes/HookContainer/HookContainer.php(155): Wikibase\Client\Hooks\ParserOutputUpdateHookHandler->onContentAlterParserOutput()
#8 /path/w/includes/HookContainer/HookRunner.php(1242): MediaWiki\HookContainer\HookContainer->run()
#9 /path/w/includes/content/AbstractContent.php(594): MediaWiki\HookContainer\HookRunner->onContentAlterParserOutput()
#10 /path/w/includes/Revision/RenderedRevision.php(263): AbstractContent->getParserOutput()
#11 /path/w/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached()
#12 /path/w/includes/Revision/RevisionRenderer.php(215): MediaWiki\Revision\RenderedRevision->getSlotParserOutput()
#13 /path/w/includes/Revision/RevisionRenderer.php(152): MediaWiki\Revision\RevisionRenderer->combineSlotOutput()
#14 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}()
#15 /path/w/includes/Revision/RenderedRevision.php(197): call_user_func()
#16 /path/w/includes/poolcounter/PoolWorkArticleView.php(216): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#17 /path/w/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleView->doWork()
#18 /path/w/includes/page/Article.php(810): PoolCounterWork->execute()
#19 /path/w/includes/actions/ViewAction.php(80): Article->view()
#20 /path/w/includes/MediaWiki.php(532): ViewAction->show()
#21 /path/w/includes/MediaWiki.php(313): MediaWiki->performAction()
#22 /path/w/includes/MediaWiki.php(945): MediaWiki->performRequest()
#23 /path/w/includes/MediaWiki.php(548): MediaWiki->main()
#24 /path/w/index.php(54): MediaWiki->run()
#25 /path/w/index.php(47): wfIndexMain()
#26 {main}

in other language wiki (frwiki and enwiki) not problem but only on this language wiki (eswiki) get error !!!

Please help me !! Beginneruser (talk) 09:28, 16 February 2022 (UTC)Reply

I have to reset all Wikibase repo entry
So run sudo php populateEntityUsage.php in extensions/Wikibase/client/maintenance
I want get new Entity for eswiki siteGlobalID in wbc_entity_usage table
but after run query get old Entity of es siteGlobalID in wbc_entity_usage table Beginneruser (talk) 09:29, 16 February 2022 (UTC)Reply
@Katie Filbert (WMDE) @Thiemo Kreuz (WMDE) please help me Beginneruser (talk) 09:30, 16 February 2022 (UTC)Reply
Ops Problem solved
I debug error and try for resolve this
content_models table in database of Wikibase repo site requirement backup Beginneruser (talk) 10:23, 16 February 2022 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How set up Wikibase client to another DB server

[edit]

I have my own installation of wikidata. I want to connect it to my wiki. But in the configs I see only direct access to the database on the server of the main wiki - repoDatabase. How can I specify a different DB server?

$wgWBClientSettings['entitySources'] = [ 'local' => [ 'entityNamespaces' => [ 'item' => 0, 'property' => 120, 'lexeme' => 146, ], 'repoDatabase' => "wikidata", //'repoDatabase' => false, 'baseUri' => 'my-dat/entity/', 'rdfNodeNamespacePrefix' => 'wd', 'rdfPredicateNamespacePrefix' => , 'interwikiPrefix' => 'd', ], ]; 31.44.94.162 (talk) 14:31, 15 February 2023 (UTC)Reply

Dynamic tables with Wikibase

[edit]

Hello! On a language wiki, I'm trying to create tables that update automatically when new articles are added to a category. The table should contain article names and associated properties via their Wikibase items.

The Idea behind it is that I  enter the data into Wikibase items, instead of adding it manually into tables. I'm currently trying to set this up using Wikibase, Lua, and DynamicPageList4. I've been working on this for days now with Grok, ChatGPT, and Gemini, and it feels like I'm getting nowhere. The AIs are also suggesting me to use SMW, which I try to avoid if it is not necessary.

Are those dynamic tables something that can be done with my current setup, or do I indeed have to add the extensions Semantic MediaWiki and Semantic Wikibase? Thanks for any info on this, cheers and all the best! Till Kraemer (talk) 15:14, 14 February 2026 (UTC)Reply

As far as I see, the output of Extension:DynamicPageList4 is invisible to parser functions or Lua code, so you won’t be able to list the category contents. This is probably among others for caching reasons, so if you use any other solution, you should make sure that the table actually gets regenerated when a new page is added to the category, rather than the previous state getting stuck. I don’t know how good SMW is at this.
For a similar problem, although not using categories, w:Template:Wikidata list was invented on WMF wikis, which solves the problem by instructing a bot to do periodic updates – if you’re able to run a bot, that would also be a solution. —Tacsipacsi (talk) 21:24, 14 February 2026 (UTC)Reply
@Tacsipacsi, thank you so much for weighing in on this! That helps a lot! I installed the extensions Semantic MediaWiki and Semantic Scribunto, and created a Lua module thanks to the help of Gemini. Now the dynamic tables work perfectly! Thanks again for your help, cheers, and all the best! PS: Thanks to Grok's advice, I did not install the Semantic Wikibase extension. Apparently, it is outdated and not needed for my tables. Till Kraemer (talk) 22:14, 15 February 2026 (UTC)Reply