LocalSettings.php should only contain one `smwgNamespaceIndex` definition and the declaration should happen before `enableSemantics`.

From semantic-mediawiki.org
< Installation‎ | Troubleshooting
Administrator manualInstallationInstallation/TroubleshootingLocalSettings.php should only contain one `smwgNamespaceIndex` definition and the declaration should happen before `enableSemantics`.

Issue[edit]

Semantic MediaWiki issues the following error message:1

LocalSettings.php should only contain one `smwgNamespaceIndex` definition and the declaration
should happen before `enableSemantics`.

This issue appears if configuration parameter $smwgNamespaceIndexSets the index of the first namespace to be used by Semantic MediaWiki was declared after invoking Semantic MediaWiki with the enableSemantics() function.

Solution[edit]

The issue can be mitigated recifying your wiki's configuration in the "LocalSettings.php" file:

// should be placed directly above the "enableSemantics()" call and only once
$smwgNamespaceIndex = '672';
enableSemantics( 'example.org' );

References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:4687