Help:Associated revision

From semantic-mediawiki.org

Semantic MediaWiki stores its data in an independent data repository and operates self-contained, yet it requires to interact with MediaWiki and its content objects.

Content (such as unstructured text, XML, or JSON) is stored in MediaWiki as part of a wikipage, any change to its content is recorded as a separate revision. Semantic MediaWiki uses the revision of the page content as source to build its data repository.

The ID of the revision that represents the latest content is assigned1 to the entity that is identified as subject in Semantic MediaWiki for the wikipage and is called associated revision. It should be noted that subobjects (or sub entities) are not assigned any associated revision because they are only linked through its parent (aka page) to the content representation hereby can only exist as part of a parent child relationship.

Only page entities are tracked in Semantic MediaWiki with an associated revision where the ID (the one give in MediaWiki and the one associated in Semantic MediaWiki) should always match (also in case some extension like Approved Revision etc. is used to manipulate the revision state) to draw a conclusion that the textual content is source for the data stored in Semantic MediaWiki.

Examination[edit]

The associated revision integrity examination was introduced with Semantic MediaWiki 3.2.0Released on 7 September 2020 and compatible with MW 1.31.0 - 1.35.x. to probe and indicate inconsistencies between the associated revision stored in Semantic MediaWiki and the revision referred to in MediaWiki for displaying the content of a wiki page.

A mismatch normally implies that the page content and the data associated with that content in Semantic MediaWiki are imbalanced or corrupted. Most likely the last storage operation in Semantic MediaWiki failed or were interrupted.

A failure in the storage process hints that some process or extension caused an exception from which Semantic MediaWiki could not recover therefore it is mandatory to check the logs for exceptions or other failure messages.

Technical note[edit]

The smw_rev field in the smw object ids database table contains the associated revision.