Having trouble adding the Wikibase extension to a MediaWiki Install

294 Views Asked by At

I am trying to set up a new MediaWiki 1.35 install and add the Wikibase extension. The install is running on a Debian 10 LXC container hosted on proxmox.

I have been following the Wikibase/Installation MediaWiki guide but I seem to be stuck. When I get to the 'Run Maintenance Scripts' step and try to run php update.php it thows the following error:

[10e7e1e19b828fdfd6418545] [no req]   Error from line 47 of /var/lib/mediawiki/extensions/Wikibase/lib/WikibaseLib.entitytypes.php: Class 'Wikibase\DataModel\Entity\ItemId' not found
Backtrace:
#0 /var/lib/mediawiki/extensions/Wikibase/client/includes/WikibaseClient.php(532): require()
#1 /var/lib/mediawiki/extensions/Wikibase/client/includes/WikibaseClient.php(748): Wikibase\Client\WikibaseClient::getDefaultEntityTypes()
#2 /var/lib/mediawiki/extensions/Wikibase/client/includes/WikibaseClient.php(796): Wikibase\Client\WikibaseClient::newInstance()
#3 /var/lib/mediawiki/extensions/Wikibase/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php(64): Wikibase\Client\WikibaseClient::getDefaultInstance()
#4 /var/lib/mediawiki/includes/installer/DatabaseUpdater.php(554): Wikibase\Client\Usage\Sql\SqlUsageTrackerSchemaUpdater::fillUsageTable(MysqlUpdater)
#5 /var/lib/mediawiki/includes/installer/DatabaseUpdater.php(522): DatabaseUpdater->runUpdates(array, boolean)
#6 /var/lib/mediawiki/maintenance/update.php(181): DatabaseUpdater->doUpdates(array)
#7 /var/lib/mediawiki/maintenance/doMaintenance.php(107): UpdateMediaWiki->execute()
#8 /var/lib/mediawiki/maintenance/update.php(253): require_once(string)
#9 {main}

I made sure to clone the proper version of Wikibase (REL1_35). I've looked everywhere for a solution but it seems like I have messed up in a unique way. I should also mention that is my first time setting up a MediaWiki server so any help is greatly appreciated.

I made a git and uploaded everything in the root of the MediaWiki install: https://github.com/ggosset2017/MediaWiki-Install.git

Update: Looks like it's a problem with some dependency. I did make sure to install composer and install dependencies following the WIkibase guide linked above. I used the following commands/file edits.

First, I updated the composer.local.json file in the root of MediaWiki install to match the following:

{
  "extra": {
    "merge-plugin": {
      "include": [
        "extensions/Wikibase/composer.json"
      ]
    }
  },
  "require": {
    "monolog/monolog": "~2.0.2"
  }
}

sshed into the container and ran the following.

rm composer.lock

composer install --no-dev

Everything seemed to download fine and the only error I got was the following:

Warning from https://repo.package.org: you are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2

I expected this error as MediaWiki does not support composer 2, at least according to this: https://www.mediawiki.org/wiki/Composer#Installing_Composer

Update 2: Looks like my composer.local.jason file was somehow changed to composer.local.jason-sample. I have removed the -sample appended to that file name. Now composer is throwing the following error when I try to run rm composer.lock and composer install --no-dev

image of composer error

In Solver.php line 243:
  Problem 1
     - The requested package monolog/monolog ~2.0.2 exists as monolog/monolog[1.25.5] but these are rejected by your constraint.
0

There are 0 best solutions below