Help:Installation/Troubleshooting

From semantic-mediawiki.org
Jump to: navigation, search
Administrator manualInstallationHelp:Installation/Troubleshooting
Troubleshooting
Explains various common problems when installing Semantic MediaWiki and how to fix them.
Table of Contents

After the upgrade of an existing SMW installation the following messages can occur which solely depend on the configuration of the "LocalSettings.php" file:

Your requirements could not be resolved to an installable set of packages.

Composer issues "Your requirements could not be resolved to an installable set of packages" followed by "Installation failed, reverting ./composer.json to its original content."1
This issue appears for MediaWiki 1.29 and later when installing the respective point release from tarballs and issuing composer require mediawiki/semantic-media-wiki "~2.5" --update-no-dev. It can be mitigated by issuing composer update --no-dev first, e.g. composer update --no-dev followed by composer require mediawiki/semantic-media-wiki "~2.5" --update-no-dev.

Could not find package x.x.x at any version for your minimum-stability (stable) ...

"[InvalidArgumentException] Could not find package 2.5.3 at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability" is caused by use of arbitrary spacing2 such as
composer require "mediawiki/semantic-media-wiki": "2.5.3";
or
composer require mediawiki/semantic-media-wiki: "2.5.3";
where in fact
composer require mediawiki/semantic-media-wiki "~2.5";
is expected.

Error: your composer.lock file is not up to date.

Error: your composer.lock file is not up to date. Run "composer update" to install newer dependencies3
This is a conflict caused by MediaWiki due to how it is using "composer.json" file for its own purpose.4 It may occur when running MediaWiki's "update.php" maintenance script. Just add the --skip-external-dependencies flag to your command, e.g.:
php maintenance/update.php --skip-external-dependencies

Fatal error: Call to undefined function enableSemantics()

Fatal error: Call to undefined function enableSemantics() in ... LocalSettings.php
Something went wrong with the registration or installation, please re-read the instillation instructions. 5
Fatal error: Call to undefined function enableSemantics()
This kind of message appears if the Validator extension is still explicitly invoked. To resolve this the following line has to be removed:
require_once "$IP/extensions/Validator/Validator.php";
Fatal: Call to undefined function enableSemantics() …
This kind of message appears for MW ≤ 1.21.x if the Extension Installer extension is included after the call to enableSemantics() (see above). Make sure that the call to include Extension Installer comes first.

Notice: Use of undefined constant …

Notice: Use of undefined constant …
This kind of message appears because SMW namespace constants (SMW_NS_PROPERTY, SMW_NS_TYPE and SMW_NS_CONCEPT) are delayed due to the parameter $smwgNamespaceIndex being a prerequisite and its initialization has to happen first it can be processed. To resolve this you have to add
enableSemantics( 'example.org' );
prior to any parameter (e.g. $wgContentNamespaces, $wgNamespacesToBeSearchedDefault and $wgNamespaceProtection) making reference to these namespace constants. In case you choose to manually set $smwgNamespaceIndex to something other than the default value of 102, you must do this above the enableSemantics() call.

Database error: A database query error has occurred.

After updating an existing SMW 1.9.0 installation the following messages may occur:

Database error: A database query error has occurred. This may indicate a bug in the software.
This error appears after an upgrade from SWM 1.9.0 to 1.9.1 when moving a page and if you have not updated the semantic store. To resolve this run the setup script from the base directory6 of your MediaWiki installation:
php maintenance/update.php

Property namespace disappears in MediaWiki 1.27*

Property namespace disappears in MediaWiki 1.27*
See 7

Property namespace broken

Property namespace apparears to be broken
See 8

Special pages used by SMW have disappeared

no special pages on SMW, no “Special:SMWAdmin”, no “Special:Browse” , and properties don’t work
"... actually it seems the ConfirmEdit extension is causing the ..."9, see also10

See also


}}