Extension:SemanticDummyEditor

The SemanticDummyEditor extension updates semantic property values that are dependent on another page's property values. With Semantic MediaWiki, changes in semantic property values are usually immediately visible in query results on other pages. However, when such query results are reused again in (the inference of) other semantic property values, the user is required to manually edit and save each dependent page to set the newly computed result. SemanticDummyEditor monitors dependency relations and automatically performs such null edits, so that changes to semantic property values are propagated to dependent properties.

Example
Suppose we are using the following properties in a Semantic MediaWiki: and that we use them through the following Template:Parent (for the sake of simplicity, we limit this example to one child and one grandchild only): Child: has child::, grandchild: has grandchild::. We add the following pages: so that Jane is the grandparent of Mel. The properties Jane has child Mary and Mary has child Mel have all correctly been set. However, Jane has grandchild Mel is not registered until a (null) edit is performed on Jane's page. The SemanticDummyEditor can take care of this.
 * has child
 * has grandchild
 * Jane:
 * Mary

Usage
Add the following line to LocalSettings.php: include "$IP/extensions/SemanticDummyEditor/SemanticDummyEditor.php";

Configuration
The SemanticDummyEditor extension takes two parameters that can be configured as follows:

$wgSDERelations
This is an array that contains the relations (page dependencies) that SemanticDummyEditor should monitor. To configure SemanticDummyEditor for the parent/child-example above, the following line should be added to LocalSettings.php: This tells SemanticDummyEditor to monitor the Has child relation. When a page has been edited, any page that has a Has child relation to that page receives a null edit (in the example above: when Mary's page has been edited, Jane's page receives a null edit). Null edits follow the whole dependency chain (in the example above: when Mel's page has been edited, Mary's page receives a null edit and consequently Jane's page receives a null edit). Circular dependencies are detected so that loops are prevented.

$wgSDEUseJobQueue
In some cases, the number of dependencies or the length of dependency chains could lead to timeouts. To prevent this, it is possible to push the execution of null edits to the job queue instead of executing them in a single transaction with the user's save action. To do so, add the following line to LocalSettings.php: