Jump to content

Talk:Wikibase/Installation

Add topic
From mediawiki.org

Can we get some installation instructions for those without Composer? :) --GeorgeBarnick (talk) 01:02, 25 May 2014 (UTC)Reply


Error when running maintenance script

[edit]

Hello, I tried to install WikiBase on a private and received an error when running the maintenance script. I did the following procedure:

  • System: mac OS Mojave, version 10.14.1
  • MediaWiki, version 1.31.1
  • Wikibase, download via link "latest version". It resulted in "Wikibase-master.tar 10-59-41-296.gz"
  • Creating a composer.local.json with content is described. Placed the file into the root of my Wiki
  • Run via terminal from the root of my Wiki: composer install --no-dev. It gave me:
> ComposerHookHandler::onPreUpdate
Loading composer repositories with package information
Updating dependencies
Package operations: 15 installs, 1 update, 3 removals
  - Removing wikimedia/testing-access-wrapper (1.0.0)
  - Removing pear/net_socket (v1.2.1)
  - Removing pear/net_smtp (1.7.3)
  - Installing composer/installers (v1.6.0): Loading from cache
  - Updating pear/pear-core-minimal (v1.10.3 => v1.10.6): Loading from cache
  - Installing data-values/interfaces (0.2.5): Loading from cache
  - Installing data-values/data-values (1.1.1): Loading from cache
  - Installing data-values/common (0.4.2): Loading from cache
  - Installing data-values/number (0.10.1): Loading from cache
  - Installing psr/simple-cache (1.0.1): Loading from cache
  - Installing serialization/serialization (4.0.0): Loading from cache
  - Installing data-values/serialization (1.2.2): Loading from cache
  - Installing wikibase/data-model (9.0.1): Loading from cache
  - Installing wikibase/data-model-serialization (2.9.0): Loading from cache
  - Installing wikibase/internal-serialization (2.9.0): Loading from cache
  - Installing diff/diff (2.3.0): Loading from cache
  - Installing wikibase/data-model-services (3.12.0): Loading from cache
  - Installing data-values/geo (3.0.1): Loading from cache
  - Installing data-values/time (1.0.1): Downloading (100%)         
Writing lock file
Generating optimized autoload files
> ComposerVendorHtaccessCreator::onEvent
  • Afterwards, I added the following lines to my Localsettings.php:
$wgEnableWikibaseRepo = true;
$wgEnableWikibaseClient = false;
require_once "$IP/extensions/Wikibase/repo/Wikibase.php";
require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php";
  • As adviced I switched to Wikibase directory with: cd extensions/Wikibase
  • After entering php repo/maintenance/rebuildItemsPerSite.php I recevied the following lines:
TG-3:Wikibase tom$ php repo/maintenance/rebuildItemsPerSite.php
[98cd2b83aed9cfef6a744f0f] [no req]   Error from line 2030 of /...extensions/Wikibase/repo/includes/WikibaseRepo.php: Call to undefined method MediaWiki\MediaWikiServices::getNameTableStoreFactory()
Backtrace:
#0 /...extensions/Wikibase/repo/includes/WikibaseRepo.php(1759): Wikibase\Repo\WikibaseRepo->getWikibaseServices()
#1 /...extensions/Wikibase/repo/RepoHooks.php(113): Wikibase\Repo\WikibaseRepo->getEntityNamespaceLookup()
#2 /...includes/Hooks.php(177): Wikibase\RepoHooks::onSetupAfterCache()
#3 /...includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
#4 /...includes/Setup.php(795): Hooks::run(string)
#5 /...maintenance/doMaintenance.php(81): require_once(string)
#6 /...extensions/Wikibase/repo/maintenance/rebuildItemsPerSite.php(86): require_once(string)
#7 {main}
  • Could somebody please help me to solve the issue? Thanks a lot!

Error fetching dependencies

[edit]

I'm definitely in the correct directory, but when I try to run

php composer.phar install

I only get the message "Could not open input file: composer.phar". The

composer install

returns command not found, so I'm rather certain I should be using the other one. When I look inside the directory I indeed can't find any file named composer.phar. I installed Composer locally, in case it matters. I'm incredibly new to all of this and am just trying to get infoboxes working on my mediawiki installation... help? (For more information there: I've got Lua errors in Module:Wikibase at (various lines): attempt to index field 'wikibase' (a nil value) all over the place, and the one answer I could find by googling indicated it might be an issue with the wikibase client not being installed. If that's not the right answer, please point me in the right direction!) RhynnCollins (talk) 17:46, 7 November 2017 (UTC)Reply

Duplicate inclusion

[edit]

Yes Resolved In addition to bugzilla:68695 (after replacing a wrong "client" with "repo" in the include), I get:

MediaWiki 1.24alpha Updater

Going to run database updates for wiki
Depending on the size of your database this may take a while!
...wb_items_per_site doesn't exist.
...wb_items doesn't exist.
...wb_aliases doesn't exist.
...wb_texts_per_lang doesn't exist.
[6508673d] [no req]   Exception from line 182 of /srv/vagrant/mediawiki/includes/Hooks.php: Invalid callback in hooks for LoadExtensionSchemaUpdates

Backtrace:
#0 /srv/vagrant/mediawiki/includes/GlobalFunctions.php(4031): Hooks::run(string, array, NULL)
#1 /srv/vagrant/mediawiki/includes/installer/DatabaseUpdater.php(117): wfRunHooks(string, array)
#2 /srv/vagrant/mediawiki/includes/installer/DatabaseUpdater.php(171): DatabaseUpdater->__construct(DatabaseMysqli, boolean, UpdateMediaWiki)
#3 /srv/vagrant/mediawiki/maintenance/update.php(162): DatabaseUpdater::newForDB(DatabaseMysqli, boolean, UpdateMediaWiki)
#4 /srv/vagrant/mediawiki/maintenance/doMaintenance.php(98): UpdateMediaWiki->execute()
#5 /srv/vagrant/mediawiki/maintenance/update.php(206): include(string)
#6 {main}

--Nemo 23:10, 27 July 2014 (UTC)Reply

Nevermind, I just to add the duplicate inclusion after the one mandated by installation instructions, that is the lines:

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

--Nemo 23:14, 27 July 2014 (UTC)Reply

Error readapidenied between private wikis

[edit]

Hello

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

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

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

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

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

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

The reason is the API doesn't read the cookie between the Wiki. --Karima Rafes (talk) 22:37, 18 November 2014 (UTC)Reply

composer command for installing dependencies

[edit]

Hi,

I needed to run the

composer install

command instead of

php composer.phar install

in the extension's folder. I am new to wikibase and currently trying to get it to work on my own pc (Win7).

It appears I installed composer "globally", which would seem to be not what the installation guide expects. Maybe this could be added? — Preceding unsigned comment added by Mr kazz (talkcontribs) 13:30, 14 January 2015

Instructions as given require MediaWiki 1.26

[edit]

The instructions given here appear to download the tip of the development sources, which won't run on my MediaWiki 1.25 installation because it says it requires MediaWiki 1.26. The system requirements page says that Wikibase only requires MediaWiki 1.23. Could someone please fix the instructions so we can use Wikibase with a released version of MediaWiki? Thanks, Bovlb (talk) 06:28, 18 October 2015 (UTC)Reply

Error in ContentHandler.php creating first item

[edit]

I've successfully installed Mediawiki 1.26.2 on Ubuntu 15.04. I added the extension Wikibase Repository extension following these steps. The installation completed without any error.

I then logged in into my new (empty) wiki to start populating my repository, I reached the page Special:SpecialPages and clicked on "Create a new Item" Special:NewItem. I filled in the form and clicked "Create".

And then I get this error

Catchable fatal error: Instantiation of 'Closure' is not allowed in /var/lib/mediawiki/mediawiki-1.26.2/includes/content/ContentHandler.php on line 334

Is this the right way to create new items?

Troubleshooting

[edit]

So, how to overcome problem in section "troubleshooting" without composer? --Infovarius (talk) 14:23, 10 August 2016 (UTC)Reply

"or to work with gerrit:"

[edit]

Below the part on check-out-a-specific-version, there is a code example for "or to work with gerrit:". This is confusing, since it is unclear if it relates to the work with gerrit in general or only if one wants a specific version. (The code indicates the former, I think, the joining to the previous sentence via the "or" the latter) Jan Dittrich (WMDE) (talk) 06:58, 27 March 2017 (UTC)Reply

Installing the "right" version

[edit]

How can I ensure that I checkout the Wikibase version that works for my Mediawiki version? In particular, which Mediawiki version (last stable? master?) do I need, if I would do a normal git clone of wikibase? The documentation is currently not clear on this, but it seems to be essential to get it running. (maybe Tobi knows more?) -- Jan Dittrich (WMDE) (talk) 06:35, 3 April 2017 (UTC)Reply

Error "You need to have Wikibase enabled in order to use this maintenance script!"

[edit]

Hello. I am trying to install Wikibase Extension on MediaWiki 1.29.0. I enabled only WikibaseClient in LocalSettings.php. Installation stopps at step "php repo/maintenance/rebuildItemsPerSite.php". Error is "You need to have Wikibase enabled in order to use this maintenance script!"

Now it is no longer possible to open an article, e. g. https://inklupedia.de/wiki/Leipzig MediaWiki pages like https://inklupedia.de/wiki/Spezial:Version are still working. There I see that Wikibase Client is already enabled:

  • Wikibase Client 0.5 alpha (10e9f91) 12:10, 2. Dez. 2017
  • Wikibase DataModel JavaScript 3.1.0
  • Wikibase JavaScript API 2.2.2
  • Wikibase Serialization JavaScript 2.1.0
  • WikibaseLib 0.5 alpha (10e9f91) 12:10, 2. Dez. 2017

To make wiki working again I will now disable the extension. --InkluPedia (talk) 09:45, 14 July 2018 (UTC)Reply

After disabling Wikibase extension wiki works as expected. I assume that there is a problem with composer.local.json file. There was no such file in mediawiki directory so I created it with content described in https://www.mediawiki.org/wiki/Wikibase/Installation#Recommended_way . but "php composer.phar install --no-dev" does not install anything. But "php composer.phar update --no-dev" is installing something and failed by Installing wikibase/javascript-api :
- Installing wikibase/data-model-services (3.10.0):
- Installing wikibase/data-model-javascript (3.1.0):
- Installing wikibase/serialization-javascript (2.1.0):
- Installing wikibase/javascript-api (2.2.2): Downloading (failed) Failed to download wikibase/javascript-api from dist: The "https://api.github.com/repos/wikimedia/mediawiki-extensions-WikibaseJavaScriptApi/zipball/64d0f11dc3357e72b60344dd516e48d62b7100fa" file could not be downloaded (HTTP/1.1 404 Not Found)
Now trying to download from source
- Installing wikibase/javascript-api (2.2.2): Cloning 64d0f11dc3
[RuntimeException]
Failed to clone https://github.com/wikimedia/mediawiki-extensions-WikibaseJavaScriptApi.git via https, ssh protocols, aborting.
- https://github.com/wikimedia/mediawiki-extensions-WikibaseJavaScriptApi.git
Cloning into '/var/www/(path to mediawiki)/vendor/wikibase/javascript-api'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/wikimedia/mediawiki-extensions-WikibaseJavaScriptApi.git/'
- git@github.com:wikimedia/mediawiki-extensions-WikibaseJavaScriptApi.git
Cloning into '/var/www/(path to mediawiki)/vendor/wikibase/javascript-api'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
There is something wrong with installation of wikibase/javascript-api. Any idea how to fix it? --InkluPedia (talk) 11:07, 22 July 2018 (UTC)Reply
Updated MediaWiki from 1.29.0 to 1.31.0. Now no error message during installation occured but a new problem: Original exception: ... /wiki/Hauptseite MWException from line 52 of <path>/mediawiki-1.31.0/extensions/Wikibase/lib/includes/Store/Sql/SiteLinkTable.php: $wiki must be a string or false.

Upgrading Wikibase to current version and installing Quickstatements

[edit]

Hi,

Anyone have any advice regarding upgrading Wikibase? We want to upgrade the install at https://para-sports.es/ but there are a bunch of technical hurdles that are difficult to get past. These include:

  • Upgrading Mediawiki to the latest version in order to be able to upgrade Wikibase. This needs to be done without changing the local customization settings and while trying to maintain a potential Mediawiki farm, as we want to be able to have a local image thing like Commons that can be pulled into Wikibase where Commons would be.
  • Upgrading extensions to be current with new version of Mediawiki.
  • Upgrading Wikibase after upgrading Mediawiki. Our database for Wikibase is over 100,000 items, We don't want to screw this up.
  • Upgrading the query engine after this, and being able to better localize this as the current examples are from Wikidata, and we can't seem to get rid of the Wikidata logo from the Query engine.
  • Installing the OAuth extension. This is required for Quick statements extension.
  • Installing Quick Statements.

Has anyone else who has updated Wikibase dealt with these issues? Is there any advice? Is there a way to do an upgrade using Docker? Or is there anyone who might be willing to assist us in doing this? It goes a bit beyond our technical expertise. :( Ãny assistance would be greatly appreciated. --LauraHale (talk) 12:06, 11 November 2018 (UTC)Reply

Also having problems with update script

[edit]

Just like the first topic in this page, when I try to run the php maintenance/update.php

I get

[5eb9eba9044e27f023f65ed4] [no req]   Error from line 35 of /var/lib/mediawiki/extensions/Wikibase/lib/WikibaseLib.entitytypes.php: Class 'Wikibase\DataModel\Entity\ItemId' not found
Backtrace:
#0 /var/lib/mediawiki/extensions/Wikibase/repo/includes/WikibaseRepo.php(789): require()
#1 /var/lib/mediawiki/extensions/Wikibase/repo/includes/WikibaseRepo.php(404): Wikibase\Repo\WikibaseRepo::getDefaultEntityTypes()
#2 /var/lib/mediawiki/extensions/Wikibase/repo/includes/WikibaseRepo.php(561): Wikibase\Repo\WikibaseRepo::newInstance()
#3 /var/lib/mediawiki/extensions/Wikibase/repo/RepoHooks.php(104): Wikibase\Repo\WikibaseRepo::getDefaultInstance()
#4 /var/lib/mediawiki/includes/Hooks.php(174): Wikibase\RepoHooks::onSetupAfterCache()
#5 /var/lib/mediawiki/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#6 /var/lib/mediawiki/includes/Setup.php(795): Hooks::run(string)
#7 /var/lib/mediawiki/maintenance/doMaintenance.php(83): require_once(string)
#8 /var/lib/mediawiki/maintenance/update.php(277): require_once(string)
#9 {main}

My system:

MediaWiki 1.34.0 PHP 7.3.11-0ubuntu0.19.10.2 (apache2handler) MySQL 8.0.19-0ubuntu0.19.10.3 ICU 63.2 Lua 5.1.5


I had this problem due to not enabling the composer-merge-plugin before the "Fetch all dependencies" step. Once enabled and starting over, the error was resolved. Destructulus (talk) 05:48, 11 April 2020 (UTC)Reply

[edit]

Since my wiki installation if fairly new and I only had two interwiki language links per wiki (with only two language wikis), I went ahead and ran the script: php client/maintenance/populateInterwiki.php After this I went to my Special:Interwiki and I found that all the wikipedia language links were inserted for wikipedia, but the two language I had already defined were not overwritten. All were written by the script except the two I had already defined. Hey that works for me. Now each time I add a new language wiki to my wiki family, I just have to update that interwiki link on the other wikis of the family.

Wikibase Version 1.37- Item on main namespace error.

[edit]

I have installed wikibase version 1.37 with Mediawiki 1.37. All working fine but Item not working for Main Namespace. code on LocalSettings.php $baseNs = 120; $wgWBRepoSettings['entityNamespaces']['item'] = NS_MAIN;

I think it's a Wb/Client error by production bcoz version 1.36 is working as well.--115.96.216.27 14:12, 26 November 2021 (UTC)Reply

Thanks everyone i got the solution :) Code will be : arrya fuction $wgWBRepoSettings['entitySources'] = [ 'local' => [ 'entityNamespaces' => [ 'item' => NS_MAIN,] --115.96.216.57 08:04, 27 November 2021 (UTC) Thankuuuuu :)Reply

Outdated + install issues

[edit]

The page is currently tagged as outdated, but there doesn't seem to be any discussion on it. I'm currently trying to get a Wikibase install working myself, and I'm stuck at the install because I get the following error:

[a53b476bb1c69684fcc5a1c2] /w/ TypeError from line 73 of /var/www/html/w/extensions/Wikibase/client/includes/Hooks/ExtensionLoadHandler.php: Argument 1 passed to Wikibase\Client\Hooks\ExtensionLoadHandler::getApiFormatReferenceSpec() must be of the type array, null given, called in /var/www/html/w/extensions/Wikibase/client/includes/Hooks/ExtensionLoadHandler.php on line 46

Backtrace:

0 /var/www/html/w/extensions/Wikibase/client/includes/Hooks/ExtensionLoadHandler.php(46): Wikibase\Client\Hooks\ExtensionLoadHandler->getApiFormatReferenceSpec()

1 /var/www/html/w/includes/Setup.php(806): Wikibase\Client\Hooks\ExtensionLoadHandler::onExtensionLoad()

2 /var/www/html/w/includes/WebStart.php(89): require_once(string)

3 /var/www/html/w/index.php(44): require(string)

4 {main}

Examining the particular line of the ExtensionLoadHandler.php file, I can see this:

$apiFormatReferenceSpec = $handler->getApiFormatReferenceSpec( $wgWBClientSettings );

Maybe I'm missing some settings configuration? I can confirm that I followed the instructions and added the following to my LocalSettings:

$wgEnableWikibaseRepo = true;

$wgEnableWikibaseClient = false;

require_once "$IP/extensions/Wikibase/repo/Wikibase.php";

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

$wgWBRepoSettings['siteLinkGroups'] = [ 'mywikigroup' ];

$wgLocalDatabases = [ 'wikibase_test' ];

$wgWBRepoSettings['localClientDatabases'] = array(

    'en' => 'wikibase_test'

);

Attempting to create the tables with php maintenance/update.php just gives me back the same error. Is this a bug? I'm running 1.35.5 and just trying to get a wikibase repo for now. We want to test it out and see if it's a good fit for an upcoming project.JFolvarcik (talk) 07:09, 14 February 2022 (UTC)Reply

I'm facing the exact same problem. Followed all steps outlined in the instructions, but could not get anything to run. Octfx (talk) 17:44, 20 February 2022 (UTC)Reply
The installation did not work for me either. --2003:C5:FF39:C098:DCD0:925B:7534:AFE 18:11, 11 April 2022 (UTC)Reply

download - please specify a base URL

[edit]

In 2.2 the instruction is "If you have the latest version of Mediawiki, download the latest version of Wikibase" but from where? There are millions of possibilities. Chances are Wikibase will be installed from a newby so it's not trivial to decide. Dolgos (talk) 16:14, 21 July 2022 (UTC)Reply

Special:NewProperty Error on local mediawiki

[edit]

Hi

I installed mediawiki 1.38 and the WikiBase extension on a local maschine.

I can create entities but when I try to create a property I get this error

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

Backtrace:

from /var/www/mediawiki/includes/page/WikiPageFactory.php(59)

any idea where it comes from?

Regards solab Solab (talk) 12:45, 25 July 2022 (UTC)Reply

Adding statements

[edit]

Installation OK

I can create items and properties.

But when I try to add a statement to an item I can't find any previously defined properties

some explanation ?

G Solab (talk) 18:36, 30 July 2022 (UTC)Reply

Error "ObservableMessageReporter not found"

[edit]

[85da2fc55da49868b74e0f70] [no req] Error: Class 'Onoi\MessageReporter\ObservableMessageReporter' not found Backtrace: from /var/www/html/mediawiki/extensions/Wikibase/repo/maintenance/rebuildItemsPerSite.php(82)

  1. 0 /var/www/html/mediawiki/maintenance/doMaintenance.php(114): Wikibase\Repo\Maintenance\RebuildItemsPerSite->execute()
  2. 1 /var/www/html/mediawiki/extensions/Wikibase/repo/maintenance/rebuildItemsPerSite.php(147): require_once(string)
  3. 2 {main}

Klymets (talk) 18:24, 12 September 2022 (UTC)Reply

Fixed it with composer update. Klymets (talk) 13:32, 14 November 2022 (UTC)Reply

An error while upgrading the MediaWiki tables (mw-config)

[edit]

An error occurred: No such service: WikibaseRepo.Settings Klymets (talk) 13:41, 14 November 2022 (UTC)Reply

Typos in the paths in 'Run maintenance scripts'?

[edit]

I might be mistaken as I'm very new at all this but I'm confused by the path syntax in the instructions for running the maintenance scripts for MediaWiki version ≥ 1.36. It looks like there are double commands on each line? Is this purposeful? Flyingratchet (talk) 22:54, 17 July 2023 (UTC)Reply

Error: Class "Diff\Differ\MapDiffer" not found

[edit]

Hello! I am extremely new to MediaWiki and stuff like this in general. I am trying to install Wikibase on Windows 10 but i am running into this error and i have no clue about how to fix it.

Any page i try to load just errors and shows MediaWiki internal error. and Original exception: [746c3afd8a7573f9ab94a044] /mediawiki/index.php/Special:Version Error: Class "Diff\Differ\MapDiffer" not found

The error also shows a Backtrace.

MediaWiki was working before i tried installing Wikibase so i think its something wrong with it (or more likely that i messed it up)

Some extra info: OS is Windows 10, I am using this Wiki for personal use only, I am using XAMPP and i am trying to import Wikipedia templates (thats why i want Wikibase)

Will provide more info if needed. YaBoiWilhelm (talk) 13:42, 9 September 2023 (UTC)Reply

It seems deprecated

[edit]

To install a client with version 1.36+, the current page says to execute:

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

In the latest version, this file only contains:

<?php

require __DIR__ . '/config/WikibaseClient.example.php';

This other file says

 <?php

/**

* Deprecated: Do not load this file. It will be removed in the future.
*/

if ( !defined( 'MEDIAWIKI' ) ) { die( 'Not an entry point.' );

}

Dominic Mayers (talk) 02:24, 10 January 2024 (UTC)Reply

Installing both the repo and the client seems the only way that works

[edit]

I tried many things and nothing worked. Looking at the code of WikibaseClient.default.php, especially the definition of $defaults['entitySources'], it appears that installing the client alone is a very delicate task. Therefore, it seems easier to install both the server and the client, even if we want only the client. It worked for me, but I haven't checked if it works well in all contexts. I only installed it, because it was a dependency and it did that job. I followed the instructions in that page, which seems more complete than the instructions in the readme.md file that comes with the extension folder. However, the readme.md file suggests the execution of git submodule update --init in the Wikibase folder, which seems important. Dominic Mayers (talk) 04:42, 10 January 2024 (UTC)Reply