"Use of undefined constant SMW_NS_PROPERTY - assumed 'SMW_NS_PROPERTY' in ...LocalSettings.php"
From semantic-mediawiki.org
After installing and adding the following lines to the "LocalSettings.php" file
wfLoadExtension( 'SemanticMediaWiki' );
$smwgNamespacesWithSemanticLinks[SMW_NS_PROPERTY] = true;
the following message occurs:
Use of undefined constant SMW_NS_PROPERTY - assumed 'SMW_NS_PROPERTY' in ...LocalSettings.php
This error appears if you do not use enableSemantics() but load SemanticMediaWiki like a regular extension.1 To resolve this, add the following to the LocalSettings.php file:
SMW 4+
wfLoadExtension( 'SemanticMediaWiki' );
enableSemantics( 'example.org' );
$smwgNamespacesWithSemanticLinks[SMW_NS_PROPERTY] = true;
Before SMW 4
enableSemantics( 'example.org' );
$smwgNamespacesWithSemanticLinks[SMW_NS_PROPERTY] = true;
Alternatively, this issue may occur in more recent versions of the software. See issue 5281.
References
- ^ Semantic MediaWiki: GitHub issue comment gh:smw:1732:377683737