Extension talk:Wikibase Repository

Jump to: navigation, search

About this board

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL
E.Kuijt (talkcontribs)

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

Thiemo Mättig (WMDE) (talkcontribs)

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?

E.Kuijt (talkcontribs)

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.

Thiemo Mättig (WMDE) (talkcontribs)

Uh. That sounds like you had a typo somewhere. Can you double-check?

E.Kuijt (talkcontribs)

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?

Thiemo Mättig (WMDE) (talkcontribs)

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?

E.Kuijt (talkcontribs)
Wikibase Client 0.5 alpha (35343ae)12:49, 14 September 2017 GPL-2.0+ Client for the Wikibase extension The Wikidata team and others
Wikibase DataModel JavaScript 3.1.0 GPL-2.0+ Javascript implementation of the Wikibase data model H. Snater
Wikibase JavaScript API 2.2.2 GPL-2.0+ Wikibase API client in JavaScript H. Snater
Wikibase Repository 0.5 alpha (35343ae)12:49, 14 September 2017 GPL-2.0+ Structured data repository The Wikidata team and others
Wikibase Serialization JavaScript 2.1.0 GPL-2.0+ JavaScript library containing serializers and deserializers for the Wikibase DataModel. H. Snater
Wikibase View 0.1-dev GPL-2.0+ Wikibase View H. Snater
WikibaseLib 0.5 alpha (35343ae)12:49, 14 September 2017 GPL-2.0+ Holds common functionality for the Wikibase and Wikibase Client extensions The Wikidata team and others

Maybe it would be wise to select a version branch?

Thiemo Mättig (WMDE) (talkcontribs)

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.

2A01:CB05:8097:8E00:9D95:28BD:BB6A:B123 (talkcontribs)

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.

Thiemo Mättig (WMDE) (talkcontribs)

As Wikibase/Installation states you should use the master branches of both MediaWiki and Wikibase. Older releases are not necessarily compatible to each other.

2A01:CB05:8097:8E00:38B8:93B7:A8A1:8773 (talkcontribs)

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.

Reply to "Cannot Edit/Add statements to an Item"
Till Kraemer (talkcontribs)

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' );

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

| 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:{} |

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

| 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:{} |

LocalSettings.php of datawiki has this line:

$wgWBRepoSettings['localClientDatabases'] = array( 'dewiki', 'enwiki', poolwiki' );

What am I missing here? Any help is more than welcome! Thanks and cheers!

Lydia Pintscher (WMDE) (talkcontribs)

Hey :) It is currently not possible unfortunately. We have an open issue for it at phabricator:T90492.

Till Kraemer (talkcontribs)

Hi @Lydia Pintscher (WMDE), thanks for your help! Sorry, I didn't know that there is already a discussion about it going on.

I changed //commons.wikimedia.org/wiki/File: to https://pool.domain.com/wiki/File: in Wikidata/extensions/Wikibase/lib/includes/Formatters/CommonsLinkFormatter.php and https://commons.wikimedia.org/w/api.php to https://pool.domain.com/w/api.php 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 $commonsWikiId = 'poolwiki'; 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? :)

Daniel Kinzler (WMDE) (talkcontribs)

Hi Till! You need to also change the URL hardcoded in wikidata/extensions/Wikibase/repo/includes/CachingCommonsMediaFileNameLookup.php

Till Kraemer (talkcontribs)

Hi @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!

Codeispoetry (talkcontribs)

Maybe the existence-check for the validation is done directly through the database?

Till Kraemer (talkcontribs)

Hi @Codeispoetry, thanks for your suggestion! I've found commonsMedia in wb_property_info and some stuff in l10n_cache but no URL :/ Cheers!

Reply to "Using own images"
Jan Dittrich (WMDE) (talkcontribs)

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.

Thiemo Mättig (WMDE) (talkcontribs)

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.

Jan Dittrich (WMDE) (talkcontribs)

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) (talkcontribs)

> 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

Reply to "Download instructions hard to follow"
BeeyanBot (talkcontribs)

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

Lydia Pintscher (WMDE) (talkcontribs)

I think you need to give it about two weeks. Thanks for translating. Let me know how your project goes.

Beeyan (talkcontribs)

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?

Beeyan (talkcontribs)

@Lydia Pintscher (WMDE)

Lydia Pintscher (WMDE) (talkcontribs)

I am not sure how it works unfortunately. Sorry.

Reply to "Language interface"
Summary by Thiemo Mättig (WMDE)

Current minimal requirement is PHP 5.3.2.

Bovlb (talkcontribs)

This page says:

 PHP 5.3 or above

But according to Thread:Extension talk:Wikibase Repository/error during installation of WB repository it requires PHP 5.3.7. Should this be corrected?

Instructions required unreleased version of MediaWiki

2
Bovlb (talkcontribs)

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 (talkcontribs)

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.

Reply to "Instructions required unreleased version of MediaWiki"

save button is kepted disabled when try to add statements

3
210.94.41.89 (talkcontribs)

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: [],…}

Bdjwiki (talkcontribs)

I forgot to login when I wrote the help. Anybody can help me?

Bene* (talkcontribs)

Did you use the latest MediaWiki version (master)?

Reply to "save button is kepted disabled when try to add statements"
AS (talkcontribs)

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?)

Bene* (talkcontribs)

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.

Reply to "Use two repositories"
Dragan Espenschied (talkcontribs)

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,

Tobias Gritschacher (WMDE) (talkcontribs)

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) (talkcontribs)

Also, could you check Special:RecentChanges if you can see any newly created items there?

Dragan Espenschied (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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.

Reply to "Can create Properties, but not Items"

error during installation of WB repository

2
Katkov Yury (talkcontribs)

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
Karima Rafes (talkcontribs)

Wikibase uses the version PHP > 5.3.7. You need to update your version of PHP.

Reply to "error during installation of WB repository"