Help:Installation/Troubleshooting

From semantic-mediawiki.org
Jump to: navigation, search
InstallationHelp:Installation/Troubleshooting
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:

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 spacing1 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 dependencies2
This is a conflict caused by MediaWiki due to how it is using "composer.json" file for its own purpose. 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. 3
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 directory4 of your MediaWiki installation:
php maintenance/update.php

Property namespace disappears in MediaWiki 1.27*

Property namespace disappears in MediaWiki 1.27*
See 5

Property namespace broken

Property namespace apparears to be broken
See 6

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 ..."7, see also8

See also


}}