Jump to content

Talk:Wikibase

About this board

Use a wikibase from wikibase.cloud as repo of a wiki

1
Loman87 (talkcontribs)

Hello,

is this possible? How should the configuration look like? The client, in this case, would be my wiki with wikibase installed.

Thanks for any help!

Reply to "Use a wikibase from wikibase.cloud as repo of a wiki"

Extension:Wikibase and installation of the extension

4
Addshore (talkcontribs)

At some point in the past, this page, or something this page pointed to, actually told you how to install the Wikibase extension. It doesn't seem to any more.

I want to link to (or at least be able to copy) some documentation that says how to install the extension for development reasons, what LocalSettings lines are needed when installing the extension, does install.php need to be run?

As far as I can tell, that is no longer the case, and I can't easily find the documentation to point to for how to install the extension for a blog post that I am writing.

An example from another extension would be https://www.mediawiki.org/wiki/Extension:Cognate#Installation

Ping @Dan Shick (WMDE):

After some searching through older version of this page I found these install pages exist, but go far above this basic installation introduction https://www.mediawiki.org/wiki/Wikibase/Installation https://www.mediawiki.org/wiki/Wikibase/Installation/Advanced_configuration, and are not currently linked from the landing page.

Thoughts?

2600:1008:B02D:B116:2998:E105:74E5:49C7 (talkcontribs)

Go for it. Maybe put it on a different page though and link that page to here?

Addshore (talkcontribs)
Addshore (talkcontribs)

And on second thoughts, to align with the rest of mediawiki.org a little more, this page I have just created should probably just live at Extension:Wikibase, and have a banner at the top that also directs people to this wider Wikibase landing page.

Thoughts?

Reply to "Extension:Wikibase and installation of the extension"

Class 'DataValues\Deserializers\DataValueDeserializer' not found

2
Marx.FelipeForte (talkcontribs)

After attempting to update to MediaWiki 1.38, I also updated the Wikibase extension. Nevertheless, both the new and the old Wikibase are currently producing the same error, hinting at a problem with how Wikibase interacts with the new MediaWiki version 1.38.

Full error log:

[5fd0ce49dfdffcca08f1df96] /wiki/ProleWiki:Main_page   Error: Class 'DataValues\Deserializers\DataValueDeserializer' not found

Backtrace:
from /var/www/prole/extensions/Wikibase/client/WikibaseClient.ServiceWiring.php(264)
 #0 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}()
 #1 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService()
 #2 /var/www/prole/includes/MediaWikiServices.php(294): Wikimedia\Services\ServiceContainer->getService()
 #3 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(424): MediaWiki\MediaWikiServices->getService()
 #4 /var/www/prole/extensions/Wikibase/client/includes/WikibaseClient.php(361): Wikimedia\Services\ServiceContainer->get()
 #5 /var/www/prole/extensions/Wikibase/client/WikibaseClient.ServiceWiring.php(860): Wikibase\Client\WikibaseClient::getDataValueDeserializer()
 #6 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}()
 #7 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService()
 #8 /var/www/prole/includes/MediaWikiServices.php(294): Wikimedia\Services\ServiceContainer->getService()
 #9 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(424): MediaWiki\MediaWikiServices->getService()
 #10 /var/www/prole/extensions/Wikibase/client/includes/WikibaseClient.php(155): Wikimedia\Services\ServiceContainer->get()
 #11 /var/www/prole/extensions/Wikibase/client/WikibaseClient.ServiceWiring.php(1057): Wikibase\Client\WikibaseClient::getSingleEntitySourceServicesFactory()
 #12 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}()
 #13 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService()
 #14 /var/www/prole/includes/MediaWikiServices.php(294): Wikimedia\Services\ServiceContainer->getService()
 #15 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(424): MediaWiki\MediaWikiServices->getService()
 #16 /var/www/prole/extensions/Wikibase/client/includes/WikibaseClient.php(160): Wikimedia\Services\ServiceContainer->get()
 #17 /var/www/prole/extensions/Wikibase/client/WikibaseClient.ServiceWiring.php(956): Wikibase\Client\WikibaseClient::getWikibaseServices()
 #18 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}()
 #19 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService()
 #20 /var/www/prole/includes/MediaWikiServices.php(294): Wikimedia\Services\ServiceContainer->getService()
 #21 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(424): MediaWiki\MediaWikiServices->getService()
 #22 /var/www/prole/extensions/Wikibase/client/includes/WikibaseClient.php(222): Wikimedia\Services\ServiceContainer->get()
 #23 /var/www/prole/extensions/Wikibase/client/WikibaseClient.ServiceWiring.php(401): Wikibase\Client\WikibaseClient::getStore()
 #24 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}()
 #25 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService()
 #26 /var/www/prole/includes/MediaWikiServices.php(294): Wikimedia\Services\ServiceContainer->getService()
 #27 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(424): MediaWiki\MediaWikiServices->getService()
 #28 /var/www/prole/extensions/Wikibase/client/includes/WikibaseClient.php(170): Wikimedia\Services\ServiceContainer->get()
 #29 /var/www/prole/extensions/Wikibase/client/WikibaseClient.ServiceWiring.php(826): Wikibase\Client\WikibaseClient::getEntityLookup()
 #30 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}()
 #31 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService()
 #32 /var/www/prole/includes/MediaWikiServices.php(294): Wikimedia\Services\ServiceContainer->getService()
 #33 /var/www/prole/vendor/wikimedia/services/src/ServiceContainer.php(424): MediaWiki\MediaWikiServices->getService()
 #34 /var/www/prole/vendor/wikimedia/object-factory/src/ObjectFactory.php(211): Wikimedia\Services\ServiceContainer->get()
 #35 /var/www/prole/vendor/wikimedia/object-factory/src/ObjectFactory.php(152): Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec()
 #36 /var/www/prole/includes/HookContainer/HookContainer.php(473): Wikimedia\ObjectFactory\ObjectFactory->createObject()
 #37 /var/www/prole/includes/HookContainer/HookContainer.php(156): MediaWiki\HookContainer\HookContainer->getHandlers()
 #38 /var/www/prole/includes/HookContainer/HookRunner.php(2858): MediaWiki\HookContainer\HookContainer->run()
 #39 /var/www/prole/includes/parser/Parser.php(635): MediaWiki\HookContainer\HookRunner->onParserClearState()
 #40 /var/www/prole/includes/parser/Parser.php(4833): Parser->clearState()
 #41 /var/www/prole/includes/parser/Parser.php(926): Parser->startParse()
 #42 /var/www/prole/includes/parser/Parser.php(4860): Parser->preprocess()
 #43 /var/www/prole/includes/cache/MessageCache.php(1257): Parser->transformMsg()
 #44 /var/www/prole/includes/language/Message.php(1474): MessageCache->transform()
 #45 /var/www/prole/includes/language/Message.php(1007): Message->transformText()
 #46 /var/www/prole/includes/language/Message.php(1071): Message->format()
 #47 /var/www/prole/includes/OutputPage.php(1041): Message->text()
 #48 /var/www/prole/includes/OutputPage.php(1090): OutputPage->setHTMLTitle()
 #49 /var/www/prole/includes/page/Article.php(464): OutputPage->setPageTitle()
 #50 /var/www/prole/includes/actions/ViewAction.php(80): Article->view()
 #51 /var/www/prole/includes/MediaWiki.php(543): ViewAction->show()
 #52 /var/www/prole/includes/MediaWiki.php(321): MediaWiki->performAction()
 #53 /var/www/prole/includes/MediaWiki.php(912): MediaWiki->performRequest()
 #54 /var/www/prole/includes/MediaWiki.php(563): MediaWiki->main()
 #55 /var/www/prole/index.php(53): MediaWiki->run()
 #56 /var/www/prole/index.php(46): wfIndexMain()
 #57 {main}
Marx.FelipeForte (talkcontribs)

Fix found: Copy "composer.json" from the Wikibase extension folder to the main folder as "composer.local.json", then run:

composer install --no-dev
MavropaliasG (talkcontribs)
Jdforrester (WMF) (talkcontribs)

These are provided in git by the development team: RELEASE-NOTES-1.37, RELEASE-NOTES-1.38, RELEASE-NOTES-1.39 etc. Is that sufficient for your needs? I don't think copying them onto the wiki would be a good idea, as they would diverge from reality pretty easily (as do the MediaWiki notes).

Which table does Wikibase query for getting the current statements on a Wikidata item?

3
Rdrg109 (talkcontribs)

I'm trying to understand how the internals of Wikibase work. Specifically, I want to know how Wikibase is able to show the current statements of a Wikidata item in the web browser of end users.

I decided to inspect the source code (link to the Wikibase repository in gerrit.wikimedia.org), but as I am not very familiar with PHP and the internals of Wikibase, I believed that I didn't find the relevant part that accomplishes what I am looking for.

I presume that Wikibase keeps track of the current statements in a table and whenever a new revision is added to the Mediawiki's the revision table, the table that stores Wikibase statements is modified accordingly. Then, when someone asks for the current statements of a Wikidata item, Wikibase returns the rows at the table that stores current Wikibase statements.

My question is: What is the workflow that is followed for Wikibase to return the current statements of a Wikidata item to users so that they see it in their web browsers?

Rdrg109 (talkcontribs)

I asked a similar question in Libera Chat's room #wikimedia-cloud and some user replied:

19:35 <rdrg109> I still have a question though: How does Wikibase is able to know the existing statements on a given Wikibase item? I presume Wikibase stores that information somewhere in a table in a database. Isn't that information stored in any of the tables named wb_* or wbt_*?
19:44 <rdrg109> ^ For the record, I opened a topic for this question in Talk:Wikibase: https://www.mediawiki.org/wiki/Topic:Y3u994hnsgkbgbz0
19:46 <+wm-bb> <<hidden username>> it’s stored in a table that’s not available on the replicas
19:46 <+wm-bb> <<hidden username>> see https://wikitech.wikimedia.org/wiki/Help:Toolforge/Database#Unavailable_tables, the `text` table is the one with all the page contents
Jdforrester (WMF) (talkcontribs)

The "workflow" is that it fetches the JSON of the Entity (not from the text table, but via external storage) and decodes it. You can call the wbgetclaims API to get the statements ('claims'), like this one for Q42/Douglas Adams, or if you really want you could fetch the raw entity JSON over the Wikibase API and decode it yourself, I suppose. Hope this helps!

Reply to "Which table does Wikibase query for getting the current statements on a Wikidata item?"
Kghbln (talkcontribs)
Kghbln (talkcontribs)
Dan Shick (WMDE) (talkcontribs)

Good suggestion! I'm adding this to my list of tasks for the next go-round with the docs (should be done by end of Aug.)

Kghbln (talkcontribs)

Thanks a bunch!

Standalone Wikibase not prefered any more?

2
Juandev (talkcontribs)

If I type in extension:wikibase I am linked here and yet the first link is Wikibase cloud. Does it mean, that standalone Wikibase instalation is not prefered any more?

Lectrician1 (talkcontribs)

Ya that's kind of weird. At least the Docker setup should be linked.

Reply to "Standalone Wikibase not prefered any more?"

Article is still linked to a deleted item

2
Till Kraemer (talkcontribs)

Hello, I have a weird issue on my wikibase repository where some old items are suddenly wikitext, so trying to edit them gives me errors like '"wikitext" content is not allowed on page Q18155 in slot "Main"'.

I'm too scared to alter the database by hand so I just wanted to delete these faulty items. However, the associated link to the item doesn't go away in the language versions, so I can't link to those articles in a new item, resulting in errors like "The link... is already used by Item Q18155.", even though that item has been already deleted.

Is there by any chance a script available that deattaches the link from an article to a deleted wikibase item? Thanks, cheers and all the best!

Till Kraemer (talkcontribs)

Redirecting the old item to the new item via Special:RedirectEntity and then deleting the old item seems to solve this issue. Cheers and all the best!

Using the main namespace for items

2
Till Kraemer (talkcontribs)

Hello, I'm running MediaWiki 1.40.0 and I would like to use the main namespace for items like on Wikidata. Can I just add something to LocalSettings.php of the repository or do I have to edit Wikibase.example.php? I'm currently using the default Wikibase.example.php and my LocalSettings.php looks like this.

Also, I'm still having issues with pre-1.37.0 items. They look like this (NSFW) while new items look like this (NSFW).

Any ideas on how to fix this are very much appreciated! Thanks, cheers and all the best!

Till Kraemer (talkcontribs)

I'm not sure if this is the best way to do it but this seems to work for me:


LocalSettings.php of the repo:


wfLoadExtension( 'WikibaseRepository', "$IP/extensions/Wikibase/extension-repo.json" );

$wgWBRepoSettings['siteLinkGroups'] = [ 'mywiki', 'pool', 'quote' ];

$wgWBRepoSettings['localClientDatabases'] = array(

    'de' => 'dewiki',

    'en' => 'enwiki',

    'ja' => 'jawiki',

);

$wgExtraNamespaces[120] = "Property";

$wgExtraNamespaces[121] = "Property_talk";

$entitySources = [

    'data' => [

        'entityNamespaces' => [ 'item' => 0, 'property' => 120 ],

        'repoDatabase' => 'datawiki',

        'baseUri' => 'https://data.mywiki.com/wiki/',

        'interwikiPrefix' => '',

        'rdfNodeNamespacePrefix' => '',

        'rdfPredicateNamespacePrefix' => 'wd',

        'type' => 'db'

    ],

];

$wgWBRepoSettings['entitySources'] = $entitySources;

$wgWBRepoSettings['localEntitySourceName'] = 'data';


LocalSettings.php of the clients:


wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );

$wgWBClientSettings['repoUrl'] = 'https://data.mywiki.com';

$wgWBClientSettings['repoScriptPath'] = '';

$wgWBClientSettings['repoArticlePath'] = '/wiki/$1';

$entitySources = [

'datawiki' => [

'repoDatabase' => 'datawiki',

        'baseUri' => 'https://data.mywiki.com/wiki/',

        'entityNamespaces' => [

            'item' => 0,

            'property' => 120,

       ],

        'interwikiPrefix' => '',

        'rdfNodeNamespacePrefix' => '',

        'rdfPredicateNamespacePrefix' => 'wd',

    ],

];

$wgWBClientSettings['entitySources'] = $entitySources;

$wgWBClientSettings['itemAndPropertySourceName'] = 'datawiki';

$wgWBClientSettings['siteLinkGroups'] = [ 'mywiki' ];

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

$wgWBClientSettings['otherProjectsLinks'] = [ 'poolwiki', 'quotewiki' ];


After the changes, I also ran cleanupTitles.php on the repo. Thanks and cheers!

Relationship between Wikibase and MediaWiki

3
Novem Linguae (talkcontribs)

Waht's the relationship between Wikibase and MediaWiki? Is Wikibase a MediaWiki extension? The GitHub readme.md says that Wikibase is multiple MediaWiki extensions and also "other components". Which extensions and components? Thanks.

Dan Shick (WMDE) (talkcontribs)

The mention of "other components" refers to a full-featured Wikibase install, as illustrated in the diagram on the top of this page: Wikibase/Maintaining


There are instructions for installing just the Wikibase extension(s), which these days is a fairly uncommon use case: Wikibase/Installation


You will probably have the best experience using our Docker images, until our Suite team finishes their work on the mechanics of the manual install, and we can update the now quite out-of-date docs: Wikibase/Suite

Novem Linguae (talkcontribs)
Reply to "Relationship between Wikibase and MediaWiki"