$smwg­Check­For­Constraint­Errors

From Linux Web Expert

Revision as of 18:51, 20 March 2020 by >Kghbln (chg)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Template:Interlanguagelink: en
Configuration parameter details:
Name $smwgCheckForConstraintErrors
Description Sets whether constraint violations are shown to the user via a page indicator
Default setting See below
Software Semantic MediaWiki
Since version
Until version still available
Configuration Miscellaneous
Keyword constraint · subobject · subject · violation


__NOBREADCRUMBLINKS__

$smwgCheckForConstraintErrors is a configuration parameter that sets whether constraint violations resulting from annotations (property-value pair) on page and the subobjects attached to them will be shown to the user via an indicator on the respective page. The number of constraint violations shown in the page indicator is limited to 20. The configuration parameter was introduced in Semantic MediaWiki 3.1.0Released on an unknown date unknown versions of MediaWiki.1

The indication of constraint violations is a convenience function to provided users with a help to quickly identify which constraints violation are currently exists for a viewed subject. The result of the constraint error check is cached and should therefore not negatively impact performance when viewing a page repeatedly.

Default setting

$smwgCheckForConstraintErrors = SMW_CONSTRAINT_ERR_CHECK_ALL;

This means that the main subject, i.e. the page and all subobjects attached to it are being checked for constraint errors.

Available options

The option enabled by default are highlighted bold.
  • SMW_CONSTRAINT_ERR_CHECK_ALL – The main subject, i.e. the page and all subobjects attached to it are being checked and displayed via a page indicator
  • SMW_CONSTRAINT_ERR_CHECK_MAIN – The main subject, i.e. the page but not the subobjects attached to it are being checked and displayed via a page indicator
  • SMW_CONSTRAINT_ERR_CHECK_NONE – Disables the check and display via a page indicator

Changing the default setting

To modify the setting to this configuration parameter, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Disabling all checks
$smwgCheckForConstraintErrors = SMW_CONSTRAINT_ERR_CHECK_NONE;
Disabling the checks for subobjects
$smwgCheckForConstraintErrors = SMW_CONSTRAINT_ERR_CHECK_MAIN;

See also

#scite could not render a citation text for reference "gh:smw:3989" because type "pullrequest" was not assigned to a template.

References

  1. ^ gh:smw:3989