Jump to content

Extension talk:Wikibase Repository

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


Issues

[edit]

I am trying to do a local installation of this extension on a wiki I have set up on my computer and it has been impossible to complete. The version of my mediawiki software is 1.22wmf3, I do have php and MySQL (latest versions) and have followed every step as shown here. the issue is that when I try to update the database after adding the Wikibase.php and ExampleSettings.php require_once calls to LocalSettings.php, it returns an error:

Fatal error: Call to undefined function mysql_error() in C:/wamp/www/Facturation/includes/db/DatabaseMysql.php on line 326

I'd like a bit of help on how to resolve this. Also, I only want to use the Wikibase extension to manage the item-like pages woth properties and values. I'm not planning to use the interwiki function. How shall I proceed? Thanks. — ΛΧΣ21 04:30, 3 May 2013 (UTC)Reply

Are you getting this error only when loading the extension? If so, try only loading the repository extension, and not the client, and see if the error goes away. Client requires some extra settings and setup that might be causing your issue here.
It would be helpful to get a stack trace so we know where the error is comming from. Try installing xdebug or so. Jeroen De Dauw (talk) 14:17, 17 May 2013 (UTC)Reply

extension:wikibase

[edit]

hi how do I add links to my website because when I create item and then click add item and then it says add the site id and site link how do I add my site link because it is only letting me use the en Wikipedia site link not mine I would like to know how can I add my site Id 90.218.233.184 20:45, 14 June 2013 (UTC)Reply

It only allows me to use enwiki as the database which means it is using wikiepdia database I would like it to use mine how do I do that 90.218.233.184 20:45, 14 June 2013 (UTC)Reply

update gz file

[edit]

hi please update gz file of wikibase because it is outdated 86.141.190.129 11:57, 12 August 2013 (UTC)Reply

Obnoxious PHP error

[edit]

When trying to install Wikibase, I get the following PHP error after adding the require_once to LocalSettings.php:

<pre style="overflow:auto;">PHP Fatal error: Class 'Wikibase\TemplateRegistry' not found in /home2/georgfd9/public_html/wikibase/extensions/Wikibase/lib/WikibaseLib.php on line 95

I get this on any wiki I try to install Wikibase on. I'm not using composer to install since I can't use composer on my server (and of course there no installation instructions for Wikibase without composer). Any help would be appreciated. GeorgeBarnick (talk) 01:29, 25 May 2014 (UTC)Reply

I created a page on labs where you can download nightly builds of the Wikibase software including all dependencies: toollabs:bene/wikibase/. I hope this can help you. Bene* (talk) 21:14, 28 May 2014 (UTC)Reply
I'm still getting the same error. Maybe I'm using a branch of Wikibase or mediawiki/core that aren't working together? I'm using master MediaWiki and was on master Wikibase, but it's as if it isn't finding the "Wikibase\TemplateRegistry" class. Where should this class be found? I'm seeing references to it in WikibaseLib.php which is the file where these errors are coming from. GeorgeBarnick (talk) 01:17, 29 May 2014 (UTC)Reply

error during installation of WB repository

[edit]

Hi! I've installed Wikibase repository and now everytime I go to anypage I see the following error:

Unexpected non-MediaWiki exception encountered, of type "InvalidArgumentException"
[5c32e309] /wikibase/index.php/Special:SpecialPages Exception from line 48 of /var/www/html/wikibase/extensions/Wikibase/repo/includes/GenericEventDispatcher.php: $listener must implement Wikibase\Lib\Store\EntityStoreWatcher

Katkov Yury (talk) 17:35, 20 June 2014 (UTC)Reply

Wikibase uses the version PHP > 5.3.7.
You need to update your version of PHP. Karima Rafes (talk) 11:45, 18 November 2014 (UTC)Reply

Wikibase extension error - failed to deserialize on EntityFactor.php

[edit]

I installed the extension wikibase following the steps defined on the page: https://www.mediawiki.org/wiki/Wikibase/Installation This is the configuration I have in LocalSettings.php file:

require_once( "$IP/extensions/Wikidata/Wikidata.php" );
$wgEnableWikibaseRepo = false;
$wgEnableWikibaseClient = true;
$wmgUseWikibaseRepo = false;
$wmgUseWikibaseClient = true;

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

$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_ITEM] = NS_MAIN;
$wgWBClientSettings["siteGlobalID"] = "enwiki";

Attached the following error trace im getting when I try to render a page:

[87a3f0c9] /en/index.php/Ian_Paisley Exception from line 163 of /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/gitExtensions/extensions/Wikidata/extensions/Wikibase/lib/includes/EntityFactory.php: failed to deserialize

Backtrace:

  1. 0 /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/gitExtensions/extensions/Wikidata/extensions/Wikibase/lib/includes/EntityFactory.php(125): Wikibase\EntityFactory->unserializedData(string, string)
  2. 1 /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/gitExtensions/extensions/Wikidata/extensions/Wikibase/repo/includes/content/ItemHandler.php(53): Wikibase\EntityFactory->newFromBlob(string, string, string)
  3. 2 /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/mediawiki-1.23.3/includes/Revision.php(1062): Wikibase\ItemHandler->unserializeContent(string, string)
  4. 3 /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/mediawiki-1.23.3/includes/Revision.php(1010): Revision->getContentInternal()
  5. 4 /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/mediawiki-1.23.3/includes/WikiPage.php(675): Revision->getContent(integer, NULL)
  6. 5 /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/mediawiki-1.23.3/includes/WikiPage.php(493): WikiPage->getContent()
  7. 6 [internal function]: WikiPage->isRedirect()
  8. 7 /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/mediawiki-1.23.3/includes/Article.php(2024): call_user_func_array(array, array)
  9. 8 /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/mediawiki-1.23.3/includes/Wiki.php(362): Article->__call(string, array)
  10. 9 /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/mediawiki-1.23.3/includes/Wiki.php(362): Article->isRedirect()
  11. 10 /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/mediawiki-1.23.3/includes/Wiki.php(289): MediaWiki->initializeArticle()
  12. 11 /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/mediawiki-1.23.3/includes/Wiki.php(588): MediaWiki->performRequest()
  13. 12 /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/mediawiki-1.23.3/includes/Wiki.php(447): MediaWiki->main()
  14. 13 /data/servers/wikimirror_mediawiki_renderer_apache/htdocs/mediawiki-1.23.3/index.php(46): MediaWiki->run()
  15. 14 {main}

Many thanks 64.236.4.40 10:58, 17 September 2014 (UTC)Reply

You seem to have normal wiki text pages in the item namespace? That is not supported. You either have to make another namespace the namespace for items or move those pages. Lydia Pintscher (WMDE) (talk) 11:26, 18 September 2014 (UTC)Reply
what do you mean about the namespace? I am trying to fix some issues we have in the UI data since august dump that we are not able to render correctly with unrecognize modules or templates getting displayed in the UI: "mw:Help:Magic words#Other" and I thought could be this extension that we have missed, any help would be useful 64.236.4.20 22:37, 12 October 2014 (UTC)Reply
Another thing I noticed: We currently don't support a released version of MediaWiki. You will have to use master. Sorry for the inconvenience. We're working on improving that situation. Lydia Pintscher (WMDE) (talk) 11:28, 18 September 2014 (UTC)Reply

Can create Properties, but not Items

[edit]

Hi, I have installed Mediawiki and Wikibase from git.

I am unable to view created Items.

Steps:

  1. Go to Special:NewItem
  2. Create new Item and submit
  3. I am getting forwarded to Item:Q9 (number increases with every attempt): "This entity does not exist. You can search the related logs to find out where it went. You can also create a new one."
  4. Special:Log&page=Item:Q9 is empty

I wonder if this is a common problem?

If not, I could post configuration details.

Thank you and best greetings, Dragan Espenschied (talk) 15:38, 9 December 2014 (UTC)Reply

Can you check and go to Q9 (main namespace) instead of Item:Q9. Just curious if there is some problem with your namespace settings.. Tobias Gritschacher (WMDE) (talk) 11:41, 12 December 2014 (UTC)Reply
Also, could you check Special:RecentChanges if you can see any newly created items there? Tobias Gritschacher (WMDE) (talk) 11:49, 12 December 2014 (UTC)Reply
The main namespace, title=Q9, says "There is currently no text in this page."
Thanks for pointing me to RecentChanges: all items I created are logged on Special:RecentChanges.
I think my namespaces are set up ok, like this in LocalSettings.php:
// dedicated namespace for items
$baseNs = 100;
// Define the namespace indexes
define( 'WB_NS_DATA', $baseNs );
define( 'WB_NS_DATA_TALK', $baseNs + 1 );
define( 'WB_NS_PROPERTY', $baseNs + 2 );
define( 'WB_NS_PROPERTY_TALK', $baseNs + 3 );
// Define the namespaces
$wgExtraNamespaces[WB_NS_DATA] = 'Item';
$wgExtraNamespaces[WB_NS_DATA_TALK] = 'Item_talk';
$wgExtraNamespaces[WB_NS_PROPERTY] = 'Property';
$wgExtraNamespaces[WB_NS_PROPERTY_TALK] = 'Property_talk';
However, my nginx log shows some PHP errors with the constants:
PHP message: PHP Notice: Constant WB_NS_PROPERTY_TALK already defined in /usr/share/nginx/sites/wiki/LocalSettings.php on line 209
However, that is exactly the line where I define it in LocalSettings.php. I don't know where another attempt is made to define this constant. Dragan Espenschied (talk) 15:39, 12 December 2014 (UTC)Reply
OK, I see that extensions/Wikibase/repo/config/Wikibase.example.php, and client, come with their own namespace definitions.
I was following the Installation instructions and did not really understand where the Namespace configs should go, but duely included
$wgEnableWikibaseRepo = true;
$wgEnableWikibaseClient = true;
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";
What is the best practice for doing this?
I want to have both, a client and repo, in the same install. Do I need to move away from the ExampleSettings alltogether? Dragan Espenschied (talk) 16:20, 12 December 2014 (UTC)Reply
Got it to work. The only thing I have to include into LocalSettings.php is this:
$wgEnableWikibaseRepo = true;
$wgEnableWikibaseClient = true;
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";
All the other code in the installation instructions is about modifying these ExampleSettings. Dragan Espenschied (talk) 23:01, 18 December 2014 (UTC)Reply

save button is kepted disabled when try to add statements

[edit]
Hello. I tired many times but I cannot add any statements to an item...
(local env : mysql 5.5.41, php 5.4.10, mediawiki 1.24.1)
For example if I try to add statement in an item such as "Obama",
save button is kept disabled and spining icon is kept shown.
go to item page -> click add next to statements -> input property such as height
-> save button is kept disabled and spining icon is kept show.
(items and properties are created by using special page functions)
If I check with chrome(F12) I alwasy got the msg below but couldn't figure out why..
Could you help me out?
[Preview]
error: {code: "param-missing",…}
code: "param-missing"
info: "A parameter that is required was missing (Either provide the item "ids" or pairs of "sites" and "titles" for corresponding pages)"
messages: [{name: "wikibase-api-param-missing", parameters: [],…}]
0: {name: "wikibase-api-param-missing", parameters: [],…} 210.94.41.89 08:24, 11 March 2015 (UTC)Reply
I forgot to login when I wrote the help. Anybody can help me? Bdjwiki (talk) 08:29, 11 March 2015 (UTC)Reply
Did you use the latest MediaWiki version (master)? Bene* (talk) 10:23, 10 July 2015 (UTC)Reply

Use two repositories

[edit]

Is it possible for a wiki to have local repository and still use Wikidata? Say, if I want to retrieve items from Wikidata and from local repository as pages medatadata? (Is it technically possible for a wikipedia to have local repository?) AS (talk) 13:33, 7 July 2015 (UTC)Reply

Currently it is not possible to use Wikidata from a local client as the Wikibase Client extension requires access to the repository's database. Furthermore, in the moment it is also not possible to connect more than one repository to a client as the parser functions and other stuff will clash. However, this feature will definitely be developed in some way as Wikipedias should have access to Wikidata and Wikimedia Commons which both will be repositories once structured media info is avialable. Bene* (talk) 10:22, 10 July 2015 (UTC)Reply

Instructions required unreleased version of MediaWiki

[edit]

As I noted on Talk:Wikibase/Installation#Instructions as given require MediaWiki 1.26, the instructions given here for using git install a version of Wikibase that simply gives the message:

Error: Wikibase requires MediaWiki 1.26 or above.

The alternative instructions to "Browse tags" show no tags. The other instructions to "Browse branches" give the error:

This entry point is for use by the Jenkins testing framework only. Use repo/Wikibase.php resp. client/WikibaseClient.php instead.

Could you please fix the instructions so that they work with MediaWiki 1.25 or, failing that, fix the promise on Extension:Wikibase Repository that it will work with MediaWiki 1.23 onwards.

Thanks! Bovlb (talk) 06:59, 18 October 2015 (UTC)Reply

OK. To answer my own question, the instructions should say something like:
cd extensions/
git clone -b REL1_25 https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Wikibase.git
The "Jenkins testing framework" came from the fact that I re-ran mw-config after Wikibase was installed and selected the WIkibase extension. Don't do that. Bovlb (talk) 00:49, 19 October 2015 (UTC)Reply

PHP version misleading

[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.


This page says:

 PHP 5.3 or above

But according to Extension talk:Wikibase Repository#c-Katkov_Yury-2014-06-20T17:35:00.000Z-error_during_installation_of_WB_repository it requires PHP 5.3.7. Should this be corrected? Bovlb (talk) 02:09, 19 October 2015 (UTC)Reply

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Language interface

[edit]

Hello, We've installed our Wikibase in petavitalitas.org but the language interface isn't the recent one, how long does it take Wikibase update the language database? I've translated item -> butir and property -> atribut as the best translation for this two terms.

https://translatewiki.net/w/i.php?title=Special:Translate&group=ext-wikibase-repo&language=id&filter=&action=proofread&optional=1 BeeyanBot (talk) 19:43, 4 March 2016 (UTC)Reply

I think you need to give it about two weeks. Thanks for translating. Let me know how your project goes. Lydia Pintscher (WMDE) (talk) 10:47, 6 March 2016 (UTC)Reply
You're welcome, sorry for making a comment using my bot account. Does it need to up-vote for the recent translation? Or it just automatically select the recent translation? Arupako (talk) 05:19, 11 March 2016 (UTC)Reply
@Lydia Pintscher (WMDE) Arupako (talk) 05:19, 11 March 2016 (UTC)Reply
I am not sure how it works unfortunately. Sorry. Lydia Pintscher (WMDE) (talk) 09:47, 15 March 2016 (UTC)Reply

Download instructions hard to follow

[edit]

The instructions for the download may be hard to understand: If the person does not know git, it is hard to get what all this stuff in the list is about. And it seems that the list is actually there if people don't know git, since those who do, can do git clone ….

Suggestions:

  • Shorten the list and make create a link to the most current stable (and a beta)
  • The infos on how the repo is structured are interesting and can be helpful but may be moved to another section
  • Installing via git actually makes sense (e.g. because easier updates) – maybe it makes sense to tell about this advantage since even minimal git knowledge is sufficient to enjoy it.

Does this make sense? I could do this changes. Jan Dittrich (WMDE) (talk) 14:09, 23 June 2016 (UTC)Reply

I agree this section is more confusing than helpful, especially since the most relevant "browse tags" link leads to an empty list. Go ahead, change it. But please avoid permanent links to any "most current" version because we will not be able to update such links every time the current state changes. Thiemo Kreuz (WMDE) 11:04, 24 June 2016 (UTC)Reply
I just see that the part I described as confusing is a template (Template:WikimediaGitCheckout) which is used on amost 400 other pages. So I would defer any changes, and voice the concerns on the discussion page there. Jan Dittrich (WMDE) (talk) 06:48, 27 June 2016 (UTC)Reply
> But please avoid permanent links to any "most current" version
Yes, I do. It was just in the case that there exists a static link that will always lead to the latest release, like link to latest release on github Jan Dittrich (WMDE) (talk) 06:15, 27 June 2016 (UTC)Reply

Using own images

[edit]

Hi, thank you for an awesome extension, I love it! :) One question though: when I create a property "image" with data type "Commons media file", I can only select files from Commons in the statements section. I'd like to use images from my own pool exclusively and I'd like to rename "Commons media file" to "Pool media file". How can I achieve this?

My Wikibase.example.php looks like this:

# $wgWBRepoSettings['specialSiteLinkGroups'] = array( 'commons', 'wikidata' );
$wgWBRepoSettings['specialSiteLinkGroups'] = array( 'pool', 'data' );</pre>

The "sites" table on the datawiki database has this row (among others):

<pre>| 123 | poolwiki | mediawiki | pool | local | en | https | moc.niamod.loop.  | a:1:{s:5:"paths";a:2:{s:9:"file_path";s:28:"https://pool.domain.com/w/$1";s:9:"page_path";s:31:"https://pool.domain.com/wiki/$1";}} | 0 | a:0:{} |</pre>

And the "sites" table of the poolwiki database has this entry (among others):

<pre>| 124 | datawiki | mediawiki | data| local | en | https | moc.niamod.atad. | a:1:{s:5:"paths";a:2:{s:9:"file_path";s:28:"https://data.domain.com/w/$1";s:9:"page_path";s:31:"https://data.domain.com/wiki/$1";}} | 0 | a:0:{} |</pre>

LocalSettings.php of datawiki has this line:

<pre>$wgWBRepoSettings['localClientDatabases'] = array( 'dewiki', 'enwiki', poolwiki' );</pre>

What am I missing here? Any help is more than welcome! Thanks and cheers! [[User:Till Kraemer|Till Kraemer]] ([[User talk:Till Kraemer|talk]]) 15:07, 26 September 2016 (UTC)
:Hey :)  It is currently not possible unfortunately. We have an open issue for it at [[phabricator:T90492]]. [[User:Lydia Pintscher (WMDE)|Lydia Pintscher (WMDE)]] ([[User talk:Lydia Pintscher (WMDE)|talk]]) 14:45, 27 September 2016 (UTC)
:Hi {{FlowMention|Lydia Pintscher (WMDE)}}, thanks for your help! Sorry, I didn't know that there is already a discussion about it going on.
:I changed  <code>//commons.wikimedia.org/wiki/File:</code> to <code>https://pool.domain.com/wiki/File:</code> in Wikidata/extensions/Wikibase/lib/includes/Formatters/CommonsLinkFormatter.php and <code>https://commons.wikimedia.org/w/api.php</code> to <code>https://pool.domain.com/w/api.php</code> in Wikidata/extensions/ValueView/lib/jquery.ui/jquery.ui.commonssuggester.js.
:Now the files of my pool show up in the statements section, but when I try to save them, I'm getting the following error: "The file "Lalala123.jpg" does not exist on Wikimedia Commons." I also set  <code>$commonsWikiId = 'poolwiki';</code> in Wikidata/extensions/Constraints/includes/ConstraintCheck/Checker/CommonsLinkChecker.php, but it still doesn't work.
:Do you know what other file(s) I have to edit or do I just have to clear some cache? Or do you mean by "not possible" it actually is not possible? :) [[User:Till Kraemer|Till Kraemer]] ([[User talk:Till Kraemer|talk]]) 20:26, 27 September 2016 (UTC)
:Hi Till! You need to also change the URL hardcoded in wikidata/extensions/Wikibase/repo/includes/CachingCommonsMediaFileNameLookup.php [[User:Daniel Kinzler (WMDE)|Daniel Kinzler (WMDE)]] ([[User talk:Daniel Kinzler (WMDE)|talk]]) 12:49, 28 September 2016 (UTC)
:Hi {{FlowMention|Daniel Kinzler (WMDE)}}, thanks for your help! Sorry, you're right, I totally missed that one. And I found another file with a hardcoded URL in it: Wikidata/extensions/Wikibase/repo/includes/WikibaseRepo.php. I changed that file too, but I'm still getting the error mentioned above. I'll keep digging :) Cheers! [[User:Till Kraemer|Till Kraemer]] ([[User talk:Till Kraemer|talk]]) 20:46, 28 September 2016 (UTC)
:Maybe the existence-check for the validation is done directly through the database? [[User:Codeispoetry|Codeispoetry]] ([[User talk:Codeispoetry|talk]]) 07:06, 29 September 2016 (UTC)
:Hi {{FlowMention|Codeispoetry}}, thanks for your suggestion! I've found <code>commonsMedia</code> in <code>wb_property_info</code> and some stuff in <code>l10n_cache</code> but no URL :/ Cheers! [[User:Till Kraemer|Till Kraemer]] ([[User talk:Till Kraemer|talk]]) 11:01, 30 September 2016 (UTC)
:Hi, I'm trying to create a list of files which need to be changed in order to use own images on the repo. I changed the following files (MediaWiki 1.31):
:*Wikibase/view/lib\wikibase-data-values-value-view/lib/jquery.ui/jquery.ui.commonssuggester.js (line 181)
:*Wikibase/lib/includes/Formatters/CommonsLinkFormatter.php (line 62)
:*Wikibase/repo/includes/CachingCommonsMediaFileNameLookup.php (line 66)
:*Wikibase/repo/includes/Rdf/RdfVocabulary.php (lines 57 and 59)
:*Wikibase/view/lib/wikibase-data-values-value-view/src/jquery.valueview.valueview.js (line 195)
:*Wikibase/view/lib/wikibase-data-values-value-view/src/experts\CommonsMediaType.js (line 30)
:*Wikibase/repo/i18n/* (around line 87 to 175, depending on the language [search for "wikibase-validator-no-such-media"])
:*Wikibase/lib/i18n/* (around line 19 to 109, depending on the language [search for "datatypes-type-commonsMedia"])
:*Wikibase/client/config/WikibaseClient.default.php (lines 241 and 246, probably not related though and probably should be changed via LocalSettings.php, see Wikibase/docs/options.wiki)
:*Wikibase/repo/config/Wikibase.default.php (lines 216, 221, 224 and 229)
:It's still not working :/ The file names and thumbs show up in the statements section, but when I try to save an image, the old error appears: "Could not save due to an error. The file "Lalala123.jpg" does not exist on MyWiki Pool."
:Do I need to change the files in the Wikibase tests folders too? Do I need to change the database name from commonswiki to mypoolwiki somewhere?
:Any ideas are more than welcome! Thanks and cheers! [[User:Till Kraemer|Till Kraemer]] ([[User talk:Till Kraemer|talk]]) 17:02, 17 August 2018 (UTC)

== Cannot Edit/Add statements to an Item ==

Hi All, After running  the wikibase/installation steps everything seemed to work just right. I can make Items and properties and these are added to my wiki.

But when I go to my new generated Item page, the +Add behind statements is missing.

In my inspect console i get this traceback.

Exception in module-execute in module wikibase.experts.getStore:

load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=04kt0mo:176 TypeError: Cannot set property 'getStore' of undefined TypeError: Cannot set property 'getStore' of undefined

    at load.php?debug=false&lang=en&modules=jquery.tipsy|jquery.wikibase.edittoolbar%2Csitelinkview%2Csnakview%2Ctoolbaritem%2Cwbtooltip|oojs-ui-core%2Coojs-ui-widgets|oojs-ui-core.styles|oojs-ui.styles.icons|wikibase.experts.getStore|wikibase.ui.entityViewInit&skin=vector&version=1dx8mfw:283

    at load.php?debug=false&lang=en&modules=jquery.tipsy|jquery.wikibase.edittoolbar%2Csitelinkview%2Csnakview%2Ctoolbaritem%2Cwbtooltip|oojs-ui-core%2Coojs-ui-widgets|oojs-ui-core.styles|oojs-ui.styles.icons|wikibase.experts.getStore|wikibase.ui.entityViewInit&skin=vector&version=1dx8mfw:284

    at Object.<anonymous> (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=04kt0mo:161)

    at fire (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=04kt0mo:45)

    at Object.add [as done] (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=04kt0mo:45)

    at Object.always (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=04kt0mo:46)

    at runScript (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=04kt0mo:160)

    at checkCssHandles (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=04kt0mo:161)

    at execute (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=04kt0mo:162)

    at Object.implement (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=04kt0mo:168)

Can anyone help me with this? Thx

Eric [[User:E.Kuijt|E.Kuijt]] ([[User talk:E.Kuijt|talk]]) 11:28, 14 September 2017 (UTC)
:{{Tracked|T175910}}
:Thanks for reporting this so carefully. I dug into the issue and found a flaw in the code that might be the reason for what you are experiencing. Can you please try the following and tell us if it helps?
:* Open the file …/extensions/Wikibase/repo/resources/experts/resources.php with a text editor.
:* In line 33, add a line as you can see here: https://gerrit.wikimedia.org/r/#/c/378013/2/repo/resources/experts/resources.php [[User:Thiemo Kreuz (WMDE)|Thiemo Kreuz (WMDE)]] 12:00, 14 September 2017 (UTC)
:Thx for your swift reply,  I changed the line and I'm afraid it didn't work for my case.
:The Errormessage now changed to: Error: Module "wikibase.experts.modules" is not loaded. Error: Module "wikibase.experts.modules" is not loaded. [[User:E.Kuijt|E.Kuijt]] ([[User talk:E.Kuijt|talk]]) 14:00, 14 September 2017 (UTC)
:Uh. That sounds like you had a typo somewhere. Can you double-check? [[User:Thiemo Kreuz (WMDE)|Thiemo Kreuz (WMDE)]] 14:06, 14 September 2017 (UTC)
:Yep, was a typo, error message gone now. Unfortunately this didn't add the +Add at the Statements button.
:Do I have to configure something else for that? [[User:E.Kuijt|E.Kuijt]] ([[User talk:E.Kuijt|talk]]) 14:13, 14 September 2017 (UTC)
:No special configuration needed. If the buttons don't appear, but you do not get an error message on the JavaScript console any more, then something a bit more awkward is broken. Hard to track down from the distance. Maybe you can check what Special:Version lists and paste the relevant parts, namely the Wikibase Repository and the DataTypes lines? [[User:Thiemo Kreuz (WMDE)|Thiemo Kreuz (WMDE)]] 14:22, 14 September 2017 (UTC)
:{| class="wikitable"
:|[[Extension:Wikibase Client|Wikibase Client]]
:|0.5 alpha [[phab:r/revision/mediawiki/extensions/Wikibase.git;35343ae13d5813c02a6ca86105d955043584eca2|(35343ae)]]12:49, 14 September 2017
:|[http://gmb-nl-s190/know/Special:Version/License/Wikibase_Client GPL-2.0+]
:|Client for the Wikibase extension
:|The Wikidata team and [http://gmb-nl-s190/know/Special:Version/Credits/Wikibase_Client others]
:|-
:|[https://github.com/wmde/WikibaseDataModelJavascript Wikibase DataModel JavaScript]
:|3.1.0
:|[http://gmb-nl-s190/know/Special:Version/License/Wikibase_DataModel_JavaScript GPL-2.0+]
:|Javascript implementation of the Wikibase data model
:|[http://www.snater.com/ H. Snater]
:|-
:|[https://git.wikimedia.org/summary/mediawiki%2Fextensions%2FWikibaseJavaScriptApi Wikibase JavaScript API]
:|2.2.2
:|[http://gmb-nl-s190/know/Special:Version/License/Wikibase_JavaScript_API GPL-2.0+]
:|Wikibase API client in JavaScript
:|[http://www.snater.com/ H. Snater]
:|-
:|[[Extension:Wikibase|Wikibase Repository]]
:|0.5 alpha [[phab:r/revision/mediawiki/extensions/Wikibase.git;35343ae13d5813c02a6ca86105d955043584eca2|(35343ae)]]12:49, 14 September 2017
:|[http://gmb-nl-s190/know/Special:Version/License/Wikibase_Repository GPL-2.0+]
:|Structured data repository
:|The Wikidata team and [http://gmb-nl-s190/know/Special:Version/Credits/Wikibase_Repository others]
:|-
:|[https://github.com/wmde/WikibaseSerializationJavaScript Wikibase Serialization JavaScript]
:|2.1.0
:|[http://gmb-nl-s190/know/Special:Version/License/Wikibase_Serialization_JavaScript GPL-2.0+]
:|JavaScript library containing serializers and deserializers for the Wikibase DataModel.
:|[http://www.snater.com/ H. Snater]
:|-
:|[[phab:diffusion/EWBV/|Wikibase View]]
:|0.1-dev
:|[http://gmb-nl-s190/know/Special:Version/License/Wikibase_View GPL-2.0+]
:|Wikibase View
:|[http://www.snater.com/ H. Snater]
:|-
:|[[Extension:WikibaseLib|WikibaseLib]]
:|0.5 alpha [[phab:r/revision/mediawiki/extensions/Wikibase.git;35343ae13d5813c02a6ca86105d955043584eca2|(35343ae)]]12:49, 14 September 2017
:|[http://gmb-nl-s190/know/Special:Version/License/WikibaseLib GPL-2.0+]
:|Holds common functionality for the Wikibase and Wikibase Client extensions
:|The Wikidata team and [http://gmb-nl-s190/know/Special:Version/Credits/WikibaseLib others]
:|}
:Maybe it would be wise to select a version branch? [[User:E.Kuijt|E.Kuijt]] ([[User talk:E.Kuijt|talk]]) 14:50, 14 September 2017 (UTC)
:Sure, that would be wise, and we are working on it. What you pasted above looks right. Sorry, I do not have an other idea at the moment. [[User:Thiemo Kreuz (WMDE)|Thiemo Kreuz (WMDE)]] 15:32, 14 September 2017 (UTC)
:Hi,
:I am having the same issue, i have the same Special:Version information for the wikibase extension. I also tried with the REL1_27 (REL1_29 and REL1_28 are broken it seems) and i do have the +add button but the "save" button to submit the form stays gray and not clickable.
:Is there any older version of MediaWiki + Wikibase that work? I would like to have it up and running no matter which version.
:Thank you very much in advance,
:Sean. [[Special:Contributions/2A01:CB05:8097:8E00:9D95:28BD:BB6A:B123|2A01:CB05:8097:8E00:9D95:28BD:BB6A:B123]] ([[User talk:2A01:CB05:8097:8E00:9D95:28BD:BB6A:B123|talk]]) 22:01, 17 September 2017 (UTC)
:As [[Wikibase/Installation]] states you should use the master branches of both MediaWiki and Wikibase. Older releases are not necessarily compatible to each other. [[User:Thiemo Kreuz (WMDE)|Thiemo Kreuz (WMDE)]] 07:52, 18 September 2017 (UTC)
:Hi,
:Thank you for your promt answer. I started working with the master version and given that i have data to transform and import as wikibase items i'm starting to play with the api. I added statements to an item hoping that the "edit" and "add value" button would be there but they arn't.
:The good news is that it seems that everything is working propely server side and the statements are being displayed on the browser, but not editable. Should i check something about the rights of my user account?
:Thanks,
:Sean. [[Special:Contributions/2A01:CB05:8097:8E00:38B8:93B7:A8A1:8773|2A01:CB05:8097:8E00:38B8:93B7:A8A1:8773]] ([[User talk:2A01:CB05:8097:8E00:38B8:93B7:A8A1:8773|talk]]) 22:17, 19 September 2017 (UTC)
:Editing is allowed for everybody by default. So no, I don't thing this has something to do with user rights. [[User:Thiemo Kreuz (WMDE)|Thiemo Kreuz (WMDE)]] 09:15, 20 September 2017 (UTC)
:Hello.
:I'd like to reactivate this question, because we installed Wikibase in early December 2017 and experience the same problem: Add button for adding statements does not exist. I checked the resources.php file mentioned in the discussion above, and it does already have the corrected line of code. Any new thoughts about what could be going on? I am not really computer savvy so unfortunately I cannot run any diagnostics without detailed instuctions.
:Thanks.
:Jouni [[User:Jtuom|Jtuom]] ([[User talk:Jtuom|talk]]) 16:13, 18 February 2018 (UTC)
:Without knowing anything about your setup the only thing I can say is that you might check your local [[d:Special:Version|Special:Version]]. Make sure the Wikibase version you installed is compatible to your MediaWiki version. This is explained in more detail on [[Wikibase/Installation]]. [[User:Thiemo Kreuz (WMDE)|Thiemo Kreuz (WMDE)]] 15:42, 20 February 2018 (UTC)
:Hi, I've installed MediaWiki 1.31.1, and I have the same problem: the add button for adding statements doesn't show. I've followed the steps in [[Wikibase/Installation]] twice, I downloaded the branch branch REL1_31, and checked the change in resources.php, I don't know what other thing could cause the problem. Thanks.
:In my Special:Version:
:*Wikibase Client: – [[git:mediawiki/extensions/Wikibase.git/+/8178d165608aeb077a925c49c4a195e175a35a7b|(8178d16)]] 15:25 17 abr 2018
:*Wikibase Repository: – [[git:mediawiki/extensions/Wikibase.git/+/8178d165608aeb077a925c49c4a195e175a35a7b|(8178d16)]] 15:25 17 abr 2018
:*Wikibase View: – [[git:mediawiki/extensions/Wikibase.git/+/8178d165608aeb077a925c49c4a195e175a35a7b|(8178d16)]] 15:25 17 abr 2018
:*WikibaseLib: – [[git:mediawiki/extensions/Wikibase.git/+/8178d165608aeb077a925c49c4a195e175a35a7b|(8178d16)]] 15:25 17 abr 2018 --<span style="text-shadow: 1px 1px 4px purple">[[User:Tinker Bell|Tinker Bell]] [[User_talk:Tinker Bell|<span style="color:#ed428d;font-size:1.4em">★</span>]] [[Special:Contributions/Tinker Bell|<span style="color:#ed428d;font-size:1.1em">♥</span>]]</span> 22:24, 2 October 2018 (UTC)
:Same issue for me here. Any help is greatly appreaciated [[Special:Contributions/141.142.60.85|141.142.60.85]] ([[User talk:141.142.60.85|talk]]) 16:43, 14 May 2019 (UTC)
:I had the same problem and I think I found a solution. The problem was that if you download a specific version from github *without* using a command "git clone ..." but instead downloading it using "Download ZIP" button, you won't get the submodules you need. The solution is to download it using a git command like so: <code>git clone '''--recursive''' --single-branch --branch REL1_31 https://github.com/wikimedia/mediawiki-extensions-Wikibase.git</code>. Note the recursive key. [[User:Skmp|Skmp]] ([[User talk:Skmp|talk]]) 01:20, 31 July 2019 (UTC)
:Hello, we have the same issue, 
:installing mediawiki REL1_34
:and wikibase REL1_34
:using 
:git clone --recursive https://gerrit.wikimedia.org/r/mediawiki/core.git --branch REL1_34 mediawiki
:and 
:composer require wikibase/wikibase:dev-REL1_34
:after install  the link "add statement" does not show
:and we get the following error
:mediawiki/includes/resourceloader/ResourceLoaderFileModule.php: ResourceLoaderFileModule::readScriptFiles: script file not found: ".../mediawiki/extensions/Wikibase/view/lib/wikibase-data-values/src/dataValues.js"
:how can we solve that on that wikimedia / wikibase version ?
:thanks
:(Thomas) [[User:Thomas-topway-it|Thomas-topway-it]] ([[User talk:Thomas-topway-it|talk]]) 22:56, 29 December 2019 (UTC)
:setting zlib.output_compression = Off in php.ini solved the issue in my case. [[User:PeaceDeadC|PeaceDeadC]] ([[User talk:PeaceDeadC|talk]]) 00:50, 16 November 2020 (UTC)
:Also doesn't work in my 1.37 version. 
:Neither recursive cloning nor turning zlib.compression off worked for me. [[Special:Contributions/134.76.2.127|134.76.2.127]] ([[User talk:134.76.2.127|talk]]) 01:04, 13 December 2021 (UTC)
:Alright, I fixed it. Running 
:<code>cd Wikibase</code>
:<code>git submodule update --init --recursive</code>
:and then doing composer --no-dev and all php scripts again did it. [[Special:Contributions/134.76.2.127|134.76.2.127]] ([[User talk:134.76.2.127|talk]]) 01:23, 13 December 2021 (UTC)

== Undefined indexes ==

Getting some errors after enabling Wikibase Repository:

<pre>[01-Nov-2017 17:17:30 UTC] PHP Notice:  Undefined index: wikibase-item in /srv/mediawiki/w/extensions/Wikibase/repo/Wikibase.hooks.php on line 85
[01-Nov-2017 17:17:30 UTC] PHP Notice:  Undefined index: wikibase-property in /srv/mediawiki/w/extensions/Wikibase/repo/Wikibase.hooks.php on line 85

Not sure how these indexes need to be "defined". Reception123 (talk) 17:21, 1 November 2017 (UTC)Reply

This sounds like you missed a step from Wikibase/Installation#Adjust your LocalSettings.php. Can you please check? Thiemo Kreuz (WMDE) 22:10, 3 November 2017 (UTC)Reply
I have checked and I do have all the settings.
There are two errors that appear. One looks to be known already upstream (https://phabricator.wikimedia.org/T179295)
Then there is
[04-Nov-2017 07:26:00 UTC] PHP Notice:  Undefined variable: wikibaseRepo in /srv/mediawiki/w/extensions/Wikibase/repo/Wikibase.php on line 833
[04-Nov-2017 07:26:00 UTC] PHP Notice:  Constant WB_NS_ITEM already defined in /srv/mediawiki/config/Wikibase.php on line 11
Reception123 (talk) 07:30, 4 November 2017 (UTC)Reply
What is config/Wikibase.php? Such a file doesn't exist in my installation. What are you using as a source? Thiemo Kreuz (WMDE) 10:38, 4 November 2017 (UTC)Reply
It is almost what Wikibase.example.php is, see the raw file here: https://raw.githubusercontent.com/miraheze/mw-config/master/Wikibase.php Reception123 (talk) 09:00, 5 November 2017 (UTC)Reply
It sounds like certain code is executed twice. I'm afraid there is nothing else to say since you did not explained your setup, and what specific source you used.
Also please don't mention my name every single time. Flow allows me to watch this thread if I want to. I don't need to be notified twice. Especially since this is not a personal thread, but everybody familiar with setting third-party Wikibase installations up should feel encouraged to respond. Thank you. Thiemo Kreuz (WMDE) 12:21, 7 November 2017 (UTC)Reply
The code should not be executed twice, since I don't have a require_once set for both, I only have one set for the file that I have shared with you (https://github.com/miraheze/mw-config/blob/master/LocalExtensions.php#L647)
Also, sorry for the pings, I'm used to doing that on other wikis where Flow isn't used and it's the only way for people to get modified. Reception123 (talk) 06:02, 10 November 2017 (UTC)Reply
I'm afraid I'm entirely lost now. Do you work on that Miraheze project? What is your setup? What do you want to do? What version of MediaWiki are you using, and what version of the Wikibase code? Or is this about the work-in-progress Docker image?
Please understand I can not help you if you do not provide a minimal amount of information. How to report a bug might help. Thiemo Kreuz (WMDE) 09:08, 10 November 2017 (UTC)Reply
Yes, I'm a volunteer there. The entire setup can be seen here: https://github.com/miraheze/mw-config, but the two files I have linked are the most important regarding Wikibase Repo. The farm needs the Wikibase extensions for several wikis who want to create items, etc.
Version: 1.29.1 and Wikibase REL1_29 branch. Reception123 (talk) 07:24, 11 November 2017 (UTC)Reply
Is the code at https://github.com/miraheze/mw-config the version of the code that is broken right now? Or are the error messages you posted from a modified local copy?
You also posted two different sets of error messages above, but never explained what you changed in between.
An error about a constant already being defined quite literally means that the relevant define() is executed twice. I would add some debug output (e.g. throw new Exception( 'I just want a stack trace' );) right before this line to understand better what's going on. But this is basic debugging I can not really help you with. Thiemo Kreuz (WMDE) 09:25, 13 November 2017 (UTC)Reply

Importing properties

[edit]

Is there a bot or a script that I can use to import properties into the most recent version of Wikibase?  I found references to an import script in a previous version but cannot find anything up-to-date.

I defined an ontology with quite a few properties and have two Wikibase repositories that I’m using in order to test data models.  I would like to keep the properties in sync between the repositories and also not have to type all of the properties in twice. As such, a way to import the properties would be greatly appreciated. Sschindehette (talk) 14:17, 4 January 2018 (UTC)Reply

https://github.com/filbertkm/WikibaseImport is the best we have for this I believe. Lydia Pintscher (WMDE) (talk) 17:53, 4 January 2018 (UTC)Reply
Thank you. I was able to use the script to successfully import some sample properties.
How do I define which Wikibase instance I import from? The script defaults to Wikidata and it wasn't obvious how to override the default. Sschindehette (talk) 20:39, 8 January 2018 (UTC)Reply
I am not sure. @Aude? Lydia Pintscher (WMDE) (talk) 20:47, 8 January 2018 (UTC)Reply

Call to undefined method Revision::getRevisionRecord()

[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.


For some reason, I get this error when I'm trying to create a new item through Special:NewItem. I searched this error in Google and found nothing. What am I downg wrong? ;(

I use:

MediaWiki 1.30.0

PHP 7.1.11 (apache2handler)

Wikibase Repository cc48ad1 (downloaded usign git)

I was following this instruction — Wikibase/Installation

Please help.

error log Skmp (talk) 17:32, 5 February 2018 (UTC)Reply

It looks like the MediaWiki version you are using does not match the Wikibase version. The branch you are pointing to is from yesterday, while MediaWiki 1.30 is from December. The red box on Wikibase/Installation mentions this. You probably want to download Wikibase's REL1_30 branch. Thiemo Kreuz (WMDE) 09:24, 6 February 2018 (UTC)Reply
It works, thanks a lot! Skmp (talk) 10:45, 6 February 2018 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Document special pages?

[edit]

It appears that special pages introduced by this extension aren't documented at all, e.g. stuff like Special:GoToLinkedPage , and others. This is in contrast to most other extensions such as Extension:CentralAuth , Extension:Linter. That special page wasn't documented even on wikidata.org. 197.235.65.167 (talk) 09:59, 29 August 2018 (UTC)Reply

Maybe use Manual:Special_pages#Help_page for most pages listed in https://www.wikidata.org/wiki/Special:SpecialPages#Wikibase. 197.235.65.167 (talk) 10:40, 29 August 2018 (UTC)Reply
What exact kind of "documentation" do you have in mind? Thiemo Kreuz (WMDE) 16:39, 29 August 2018 (UTC)Reply
At this point any documentation would be better than the status quo. There was zero documentation on gotolinkedpage, until recently added to a FAQ on wikidata. It was not even clear where to add such documentation considering that not a single page on mediawiki.org seems to have a mention of wikibase special pages.
So basically, any documentation on the purpose and usage instructions. While most of those are only relevant to wikidata others are relevant elsewhere :
The word "entity" might be understood by wikidata editors, and software engineers, but it is jargon, and the special page above doesn't have a single link to an explanatory note.
Side note: It appears that several people have asked for existing functionality exactly because it isn't documented, e.g.: https://phabricator.wikimedia.org/T176317, https://phabricator.wikimedia.org/T202299and probably others. 197.235.55.43 (talk) 15:15, 30 August 2018 (UTC)Reply
Thanks for bringing this up. However, I'm afraid I can't really tell what the question or suggestion is. Special pages typically don't exist in isolation, but make sense in a particular context, for particular use cases. The first line on each special page should explain what it is for, and ideally provide a link either in the text or via the question mark icon in the top right corner. If this is missing, please feel free to suggest improvements, ideally as a Phabricator ticket or on the talk page of d:Wikidata:WikiProject Documentation. Thiemo Kreuz (WMDE) 08:55, 31 August 2018 (UTC)Reply
The suggestion is simply to add some basic documentation on wiki about it. The simplest case would be a simple listing of the special pages along with a brief description of what they do, e.g.:
|+
!Page
!Description
|-
|Special:One
|The one ...
|-
|
|
|-
|
|
|} 197.235.77.164 (talk) 21:25, 31 August 2018 (UTC)Reply
Pages like https://www.wikidata.org/wiki/Special:AvailableBadges, and https://www.wikidata.org/wiki/Special:RedirectEntitydon't have much description even in the special pages themselves. So context is definitely missing there.
It seems that some extensions have a mention of special pages in Module:Extensionjson all that would be needed would be a simple description of each. Long term, it would probably make more sense to have a parserfunction that pulls this information from the extensions, that way it would never get out of sync with the deployed code...
Anyway, thanks for the links. 197.235.77.164 (talk) 21:34, 31 August 2018 (UTC)Reply

Search box doesn't work properly since Wikibase is installed

[edit]

The autocompletion in the Search Box doesn't work properly, since I installed Wikibase. No matter what I type, it displays a spinning wheel and then returns "No match was found".

The Advanced Search is working correctly and throws out autocompletion proposals as before.

WikiBase is running smooth, too. Cccefalon (talk) 06:23, 24 April 2020 (UTC)Reply

mediawiki and wikidata

[edit]

I have mediawiki installed, and wikibase installed as well,

The question here, How can i access wikibase? to confirm that its working or functioning. Abdulaziz Alwafaee (talk) 05:18, 25 May 2020 (UTC)Reply

I think you want to check your own Special:SpecialPages and see if it lists the special pages to create properties as well as items. These should be in a "Wikibase" section at the bottom of the page. It might be that you can't access Special:NewProperty if you are not an administrator. However, it should be possible to create your first item without having any properties. Thiemo Kreuz (WMDE) 08:59, 25 May 2020 (UTC)Reply
i have it and i can access Special:NewProperty, but its being active on pages.
for each and every page here or on wikipedia, you will get a link named Wikidata item, i can't find this link Abdulaziz Alwafaee (talk) 09:18, 25 May 2020 (UTC)Reply
Oh, so you want to connect different wikis with each other? That's a very different question then. Please refer to Wikibase/Installation as well as Wikibase/Installation/Advanced configuration#Features & Usage. Thiemo Kreuz (WMDE) 09:48, 25 May 2020 (UTC)Reply
i only have one wiki, and i dont wont to link to a different wiki, i only want o show wikidata inside page information, is it possible for single wiki Abdulaziz Alwafaee (talk) 09:50, 25 May 2020 (UTC)Reply
What do you want to achieve?
There is not much value in linking pages (e.g. in the main namespace) to items (e.g. in an Item: namespace) on the same wiki. You can try doing this by setting up Repo and Client the same time. But the as far as I know only advantage you have is that you can use certain functions in the main namespace (e.g. {{#statements:…}}) without naming the Q-ID of the item. Thiemo Kreuz (WMDE) 10:21, 25 May 2020 (UTC)Reply
I only wanted to maintain values of templates, for instance, the template that gets information of Wayback machine here at this link;
https://en.wikipedia.org/wiki/Wayback_Machine
All the required information are being directly fetched from wikibase, while at the same time i can't fetch it on my wiki.
You looks more experienced than I do, you might be able to help me form my question in a better way.
Thank you for being active here Abdulaziz Alwafaee (talk) 10:27, 25 May 2020 (UTC)Reply
Do you want to create your own data repository, or do you want to reuse data from wikidata.org? The later is not yet possible. Thiemo Kreuz (WMDE) 10:44, 25 May 2020 (UTC)Reply
reusing data from wikidata is not possible, and i do understand this, but how to create my own data, i have no idea, I've installed everything, and all are working with no errors, but i only miss something to do which i dont know what.
if you want i can share access with you, Abdulaziz Alwafaee (talk) 10:55, 25 May 2020 (UTC)Reply

getGlobalSiteID nill value

[edit]

MW 1.34.2: "Lua error in Module:Wd at line 196: attempt to call field 'getGlobalSiteId' (a nil value)." Prolific error on each and every WP Template:Infobox company layout and across the internet. Here is an example on my site: https://digitalmatrixgroup.com/index.php/Caliber_Home_Loans

Been in and out of IRC and have not found a solution. Any help appreciated! Foreclosurepedia (talk) 16:10, 25 September 2020 (UTC)Reply

I realize this is a Lua error; however, Wikibase cited as potential issue here: https://en.wikipedia.org/wiki/Module_talk:Wd
I attempted to upgrade to Wikibase 1.35 and got 500 Server error. Not sure if the upgrade would even help and if so, do I then need to upgrade everything including the MW Core?
Thanks Foreclosurepedia (talk) 16:17, 25 September 2020 (UTC)Reply

Wikibase items show wikitext after update

[edit]
Hello, I recently upgraded to MediaWiki 1.37.0 and used the settings mentioned here. I'd like to continue using the main namespace for items, so my Wikibase.example.php looks like this:
// Alternative settings, using the main namespace for items.
// Note: if you do that, several core tests may fail. Parser tests for instance
// assume that the main namespace contains wikitext.
$baseNs = 120;

// NOTE: do *not* define WB_NS_ITEM and WB_NS_ITEM_TALK when using a core namespace for items!
define( 'WB_NS_PROPERTY', $baseNs +2 );
define( 'WB_NS_PROPERTY_TALK', $baseNs +3 );
define( 'WB_NS_QUERY', $baseNs +4 );
define( 'WB_NS_QUERY_TALK', $baseNs +5 );

// You can set up an alias for the main namespace, if you like.
//$wgNamespaceAliases['Item'] = NS_MAIN;
//$wgNamespaceAliases['Item_talk'] = NS_TALK;

// No extra namespace for items, using a core namespace for that.
$wgExtraNamespaces[WB_NS_PROPERTY] = 'Property';
$wgExtraNamespaces[WB_NS_PROPERTY_TALK] = 'Property_talk';
$wgExtraNamespaces[WB_NS_QUERY] = 'Query';
$wgExtraNamespaces[WB_NS_QUERY_TALK] = 'Query_talk';

// Tell Wikibase which namespace to use for which kind of entity
$wgWBRepoSettings['entitySources'] = [
	'local' => [
		'entityNamespaces' => [
			'item' => NS_MAIN, // <=== Use main namespace for items!!!
			'property' => WB_NS_PROPERTY, // use custom namespace
			'query' => WB_NS_QUERY, // use custom namespace
		],
		'repoDatabase' => $wgDBname,
		'baseUri' => $wgServer . '/wiki/',
		'rdfNodeNamespacePrefix' => 'wd',
		'rdfPredicateNamespacePrefix' => '',
		'interwikiPrefix' => '',
	],
];
I am able to create new items via Special:NewItem and I can edit them properly. However, all old items aren't editable and look like this:
{"type":"item","id":"Q1","labels":{"en":{
[...]
When I use Special:Export to export the new items, the XML file contains the following lines:

<model>wikibase-item</model> <format>application/json</format>

The old items contain lines like these:

<model>wikitext</model> <format>text/x-wiki</format>

The Page information of the old and new items show: Page content model: Wikibase Item. When I try to edit an old item via https://data.domain.com/wiki/Special:SetLabelDescriptionAliases/Q1/en, the following error shows up:
Internal error

[123456789] /wiki/Special:SetLabelDescriptionAliases/Q1/en TypeError: Argument 2 passed to Wikibase\Repo\Notifications\WikiPageActionEntityChangeFactory::newForPageModified() must be an instance of Wikibase\Repo\Content\EntityContent, instance of WikitextContent given, called in /path/to/data/w/extensions/Wikibase/repo/includes/Notifications/ChangeNotifier.php on line 149

Backtrace:

from /path/to/data/w/extensions/Wikibase/repo/includes/Notifications/WikiPageActionEntityChangeFactory.php(82)

  1. 0 /path/to/data/w/extensions/Wikibase/repo/includes/Notifications/ChangeNotifier.php(149): Wikibase\Repo\Notifications\WikiPageActionEntityChangeFactory->newForPageModified()
  2. 1 /path/to/data/w/extensions/Wikibase/repo/includes/RepoHooks.php(254): Wikibase\Repo\Notifications\ChangeNotifier->notifyOnPageModified()
  3. 2 /path/to/data/w/includes/HookContainer/HookContainer.php(338): Wikibase\Repo\RepoHooks::onRevisionFromEditComplete()
  4. 3 /path/to/data/w/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
  5. 4 /path/to/data/w/includes/HookContainer/HookRunner.php(3191): MediaWiki\HookContainer\HookContainer->run()
  6. 5 /path/to/data/w/includes/Storage/PageUpdater.php(1255): MediaWiki\HookContainer\HookRunner->onRevisionFromEditComplete()
  7. 6 /path/to/data/w/includes/Storage/PageUpdater.php(833): MediaWiki\Storage\PageUpdater->doModify()
  8. 7 /path/to/data/w/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php(403): MediaWiki\Storage\PageUpdater->saveRevision()
  9. 8 /path/to/data/w/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php(262): Wikibase\Repo\Store\Sql\WikiPageEntityStore->saveEntityContent()
  10. 9 /path/to/data/w/extensions/Wikibase/lib/includes/Store/TypeDispatchingEntityStore.php(85): Wikibase\Repo\Store\Sql\WikiPageEntityStore->saveEntity()
  11. 10 /path/to/data/w/extensions/Wikibase/repo/includes/EditEntity/StatsdSaveTimeRecordingEntityStore.php(53): Wikibase\Lib\Store\TypeDispatchingEntityStore->saveEntity()
  12. 11 /path/to/data/w/extensions/Wikibase/repo/includes/EditEntity/MediawikiEditEntity.php(735): Wikibase\Repo\EditEntity\StatsdSaveTimeRecordingEntityStore->saveEntity()
  13. 12 /path/to/data/w/extensions/Wikibase/repo/includes/EditEntity/StatsdSaveTimeRecordingEditEntity.php(77): Wikibase\Repo\EditEntity\MediawikiEditEntity->attemptSave()
  14. 13 /path/to/data/w/extensions/Wikibase/repo/includes/Specials/SpecialWikibaseRepoPage.php(194): Wikibase\Repo\EditEntity\StatsdSaveTimeRecordingEditEntity->attemptSave()
  15. 14 /path/to/data/w/extensions/Wikibase/repo/includes/Specials/SpecialModifyEntity.php(219): Wikibase\Repo\Specials\SpecialWikibaseRepoPage->saveEntity()
  16. 15 /path/to/data/w/includes/specialpage/SpecialPage.php(647): Wikibase\Repo\Specials\SpecialModifyEntity->execute()
  17. 16 /path/to/data/w/includes/specialpage/SpecialPageFactory.php(1366): SpecialPage->run()
  18. 17 /path/to/data/w/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
  19. 18 /path/to/data/w/includes/MediaWiki.php(925): MediaWiki->performRequest()
  20. 19 /path/to/data/w/includes/MediaWiki.php(559): MediaWiki->main()
  21. 20 /path/to/data/w/index.php(53): MediaWiki->run()
  22. 21 /path/to/data/w/index.php(46): wfIndexMain()
  23. 22 {main}
Any help is more than appreciated!

Thanks and cheers,

Till Till Kraemer (talk) 19:45, 8 December 2021 (UTC)Reply

I just exported an old item via Special:Export and changed <model>wikitext</model> to <model>wikibase-item</model> and <format>text/x-wiki</format> to <format>application/json</format> in Notepad++. When I try to import the XML file with Special:Import, I get the following message: "Revision 1 using content model wikitext cannot be stored on "Q1" on this wiki, since that model is not supported on that page." This is pretty similar to the message I get when I try to use Special:ChangeContentModel: "No content models available: The content on Item (Q1) cannot be converted to any type."
I temporarily set $wgWBRepoSettings['allowEntityImport'] = true; in LocalSettings.php and imported the XML file with importDump.php. The script ran without any error but the content model didn't change.
I also tried to add $wgWBRepoSettings['entityNamespaces']['CONTENT_MODEL_WIKIBASE_ITEM'] = NS_MAIN; and even $wgNamespaceContentModels[NS_MAIN] = 'CONTENT_MODEL_WIKIBASE_ITEM'; to LocalSettings.php but that didn't solve the problem either.
I don't really understand why the old items and the new items are in the same namespace and still behave differently. @Thiemo Kreuz (WMDE), do you have any idea what could be at play here?
Thanks and cheers,
Till Till Kraemer (talk) 12:10, 31 December 2021 (UTC)Reply
just a thought... isn't entitySources supposed to be defined on the $wgWbClientSettings array? Looking at the configuration page it seems to be a client setting, not a repo setting? Lwangaman (talk) 09:39, 12 September 2022 (UTC)Reply
actually let me correct that... the configuration page doesn't explain very much. Reading the full documentation, I see it is both a client and a repo configuration... Lwangaman (talk) 10:18, 12 September 2022 (UTC)Reply
@Lwangaman, Thank you for the reply! I guess I just have to keep on trying. Maybe one day a new version will be released that fixes my issues :) Cheers and all the best! Till Kraemer (talk) 12:31, 18 November 2022 (UTC)Reply
The only way I found to fix this is to create a new item, delete the old item, redirect the old item to the new item, and delete the redirect. With thousands of items, this is a lot of work though. Anyway, it's still a solution. Thanks, cheers and all the best! Till Kraemer (talk) 18:30, 23 January 2024 (UTC)Reply
I filed a bug report: https://phabricator.wikimedia.org/T355829 Till Kraemer (talk) 12:08, 19 April 2024 (UTC)Reply

wikibase 1.39 with SemanticMediawiki 4.1.1 errors

[edit]

Tried and installed both extensions. They work individually but not together.

The error is;

/mediawiki/index.php/Special:NewProperty MediaWiki\Page\PageAssertionException: The given PageIdentity Special:Badtitle/NS122:NewProperty does not represent a proper page

#0/mediawiki/extensions/Wikibase/repo/includes/EditEntity/MediawikiEditFilterHookRunner.php(142): MediaWiki\Page\WikiPageFactory->newFromTitle()

....

Any advice? 84.254.82.147 (talk) 12:04, 3 April 2023 (UTC)Reply

We observed a namespace name conflict between Semantic MediaWiki and Wikibase. Both are using a namespace with the canonical name 'Property'. We renamed the Semantic MediaWiki namespace and successfully use both extensions in the same wiki.
$IP/LocalSettings.php:
# the namespace names must bechanged before SMW is activated
$wgExtraNamespaces[102] = "SemanticProperty";
$wgExtraNamespaces[103] = "SemanticProperty_talk";
wfLoadExtension( 'SemanticMediaWiki' );
enableSemantics( 'localhost' );
$IP/extensions/SemanticMediaWiki/src/NamespaceManager.php:
public static function getCanonicalNames() {
		$canonicalNames = [
			SMW_NS_PROPERTY      => 'SemanticProperty',
			SMW_NS_PROPERTY_TALK => 'SemanticProperty_talk',
            ...
		];
		return $canonicalNames;
Tested with MW 1.35 and SMW 4.0.2 MW Kappa (talk) 16:10, 25 April 2023 (UTC)Reply

How to get values for Wikibase datatype 'Tabular data' from local wiki rather than from commons.wikimedia.org?

[edit]

We are wondering whether it is possible to configure Wikibase and/or JsonConfig for using the local wiki as a source of the values for Wikibase properties with type 'tabular data'. Our current configuration is

$wgJsonConfigModels['JsonConfig.TabularContent.local'] = 'JsonConfig\JCTabularContent';
$wgJsonConfigs['JsonConfig.TabularContent.local'] = array(
        'namespace' => 486,     
        'nsName' => 'Data', 
        // pattern for page name
        'pattern' => '/^[A-Z]*[a-z]*\.tab$/',
        'isLocal' => true,
);

but this does not work as desired. Wikibase still searches for *.tab pages in commons.mediawiki.org rather than in the local wiki. MW Kappa (talk) 15:59, 25 April 2023 (UTC)Reply

Error in Items

[edit]

I get this error:

/wiki/Item:Q317 TypeError: Wikibase\Lib\LanguageNameLookup::getName(): Argument #1 ($languageCode) must be of type string, null given, called in   /extensions/Wikibase/view/src/SiteLinksView.php on line 296
Backtrace:
from   /extensions/Wikibase/lib/includes/LanguageNameLookup.php(55)
#0   /extensions/Wikibase/view/src/SiteLinksView.php(296): Wikibase\Lib\LanguageNameLookup->getName()
#1   /extensions/Wikibase/view/src/SiteLinksView.php(263): Wikibase\View\SiteLinksView->getHtmlForSiteLink()
#2   /extensions/Wikibase/view/src/SiteLinksView.php(182): Wikibase\View\SiteLinksView->getHtmlForSiteLinks()
#3   /extensions/Wikibase/view/src/SiteLinksView.php(120): Wikibase\View\SiteLinksView->getHtmlForSiteLinkGroup()
#4   /extensions/Wikibase/view/src/ItemView.php(153): Wikibase\View\SiteLinksView->getHtml()
#5   /extensions/Wikibase/view/src/ItemView.php(142): Wikibase\View\ItemView->getHtmlForSiteLinks()
#6   /extensions/Wikibase/view/src/EntityView.php(57): Wikibase\View\ItemView->getSideHtml()
#7   /extensions/Wikibase/view/src/ItemView.php(103): Wikibase\View\EntityView->renderEntityView()
#8   /extensions/Wikibase/repo/includes/ParserOutput/FullEntityParserOutputGenerator.php(147): Wikibase\View\ItemView->getContent()
#9   /extensions/Wikibase/repo/includes/ParserOutput/FullEntityParserOutputGenerator.php(100): Wikibase\Repo\ParserOutput\FullEntityParserOutputGenerator->addHtmlToParserOutput()
#10   /extensions/Wikibase/repo/includes/ParserOutput/StatsdTimeRecordingEntityParserOutputGenerator.php(53): Wikibase\Repo\ParserOutput\FullEntityParserOutputGenerator->getParserOutput()
#11   /extensions/Wikibase/repo/includes/Content/EntityHandler.php(861): Wikibase\Repo\ParserOutput\StatsdTimeRecordingEntityParserOutputGenerator->getParserOutput()
#12   /extensions/Wikibase/repo/includes/Content/ItemHandler.php(302): Wikibase\Repo\Content\EntityHandler->getParserOutputFromEntityView()
#13   /extensions/Wikibase/repo/includes/Content/EntityHandler.php(789): Wikibase\Repo\Content\ItemHandler->getParserOutputFromEntityView()
#14   /includes/content/ContentHandler.php(1691): Wikibase\Repo\Content\EntityHandler->fillParserOutput()
#15   /includes/content/Renderer/ContentRenderer.php(79): MediaWiki\Content\ContentHandler->getParserOutput()
#16   /includes/Revision/RenderedRevision.php(263): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput()
#17   /includes/Revision/RenderedRevision.php(236): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached()
#18   /includes/Revision/RevisionRenderer.php(239): MediaWiki\Revision\RenderedRevision->getSlotParserOutput()
#19   /includes/Revision/RevisionRenderer.php(172): MediaWiki\Revision\RevisionRenderer->combineSlotOutput()
#20 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}()
#21   /includes/Revision/RenderedRevision.php(199): call_user_func()
#22   /includes/poolcounter/PoolWorkArticleView.php(106): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#23   /includes/poolcounter/PoolWorkArticleViewCurrent.php(123): MediaWiki\PoolCounter\PoolWorkArticleView->renderRevision()
#24   /includes/poolcounter/PoolCounterWork.php(171): MediaWiki\PoolCounter\PoolWorkArticleViewCurrent->doWork()
#25   /includes/page/ParserOutputAccess.php(362): MediaWiki\PoolCounter\PoolCounterWork->execute()
#26   /includes/page/Article.php(827): MediaWiki\Page\ParserOutputAccess->getParserOutput()
#27   /includes/page/Article.php(547): Article->generateContentOutput()
#28   /extensions/Wikibase/repo/includes/Actions/ViewEntityAction.php(80): Article->view()
#29   /extensions/Wikibase/repo/includes/Actions/ViewEntityAction.php(55): Wikibase\Repo\Actions\ViewEntityAction->showEntityPage()
#30   /includes/actions/ActionEntryPoint.php(733): Wikibase\Repo\Actions\ViewEntityAction->show()
#31   /includes/actions/ActionEntryPoint.php(510): MediaWiki\Actions\ActionEntryPoint->performAction()
#32   /includes/actions/ActionEntryPoint.php(146): MediaWiki\Actions\ActionEntryPoint->performRequest()
#33   /includes/MediaWikiEntryPoint.php(200): MediaWiki\Actions\ActionEntryPoint->execute()
#34   /index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#35 {main}
Mshastchi (talk) 08:53, 29 May 2025 (UTC)Reply


Here is my the wikibase part of my LocalSettings.php:
if ( $wgDBname == 'wikidatawiki' ) {
		wfLoadExtension( 'WikibaseRepository', "$IP/extensions/Wikibase/extension-repo.json" );
		require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php";
		$wgWBRepoSettings['siteGroup'] = 'special';
		$wgWBRepoSettings['siteGlobalID'] = 'wikidatawiki';
		$wgWBRepoSettings['siteLinkGroups'] = [ 'wikivahdat', 'special' ];
		$wgWBRepoSettings['specialSiteLinkGroups'] = [ 'commons', 'meta', 'wikidata' ];

		$wgLocalDatabases = [ 'enwiki', 'fawiki', 'arwiki', 'urwiki', 'metawiki', 'commonswiki' ];
		$wgWBRepoSettings['localClientDatabases'] = array(
			'en' 	=> 'enwiki',
			'fa' 	=> 'fawiki',
			'ar' 	=> 'arwiki',
			'ur'    => 'urwiki',
			'meta'	=> 'metawiki',
			'commons' => 'commonswiki',
			'wikidata' => 'wikidatawiki'
		);

		$wgWBRepoSettings['dataRightsUrl'] = 'https://creativecommons.org/publicdomain/zero/1.0/';	
	} else {
		wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );
		require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
		$wgWBClientSettings['repoUrl'] = 'https://data.wikivahdat.com';
		$wgWBClientSettings['repoScriptPath'] = '/w';
		$wgWBClientSettings['repoArticlePath'] = '/wiki/$1';
		$wgWBClientSettings['entitySources'] = [
			'wikidata' => [
				'repoDatabase' => 'wikidatawiki',
				'baseUri' => 'https://data.wikivahdat.com/entity/',
				'entityNamespaces' => [
					'item' => 120,
					'property' => 122,
				],
				'rdfNodeNamespacePrefix' => 'wd',
				'rdfPredicateNamespacePrefix' => '',
				'interwikiPrefix' => '',
			],
		];
		$wgWBClientSettings['itemAndPropertySourceName'] = 'wikidata';
		$wgWBClientSettings['siteLinkGroups'] = [ 'wikivahdat', 'special' ];
		$wgWBClientSettings['specialSiteLinkGroups'] = [ 'commonswiki', 'metawiki', 'wikidatawiki' ];
		$wgWBClientSettings['siteGlobalID'] = $wgDBname;	
}
The problem was with the 'sites' table you have to have a complete table there including the language column.

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

Looks like it is not possible using DynamicPageList4. 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! 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:22, 15 February 2026 (UTC)Reply