The variation system in SharePoint allows automatically creating and updating content in target variation labels.
Some of these actions are performed silently without a user requesting variation updates explicitly through UI interaction.
In order to perform these updates it is necessary for the variation system to be informed about content changes and changes in the variation hierarchy to keep the links between the variation peers intact.
To achieve this, the variation system registers different event handlers, which trigger content updates and the maintenance of the underlying data structures:
ItemAdded event on Pages Library
This event is used to restore and update relationships list entries in case that a publishing page was restored from the recycle bin.
ItemUpdated event on Pages Library
This event is used to trigger the peer page creation and peer page update if automatic content creation and propagation is enabled for Pages libraries which have minor versions and/or content moderation enabled.
ItemCheckedIn event on Pages Library
This event is used to trigger the peer page creation and peer page update if automatic content creation and propagation is enabled for Pages libraries which have minor versions and content moderation disabled.
ItemDeleting event on Pages Library
This event is used to collect the information about the variation group the publishing page which is about to be deleted belongs to - to make it available in the ItemDeleted event firing after the delete operation. Inside the ItemDeleted event it is not possible to get this information directly from the publishing page as this page has already been deleted at this time.
ItemDeleted event on Pages Library
This event is used to update the relationships list entries for deleted and recycled publishing pages.
- If a publishing page which resided in the source variation label is deleted or recycled then all relationships list entries referencing the variation group of the deleted/recycled page are recycled as well.
- If a publishing page which resided in a target variation label was deleted or recycled then its relationships list entry is marked as deleted by setting the value of the "Deleted" column of the relationships list entry to "Yes".
In case of a restore of a deleted page from the recycle bin, these actions have to be reverted. See the ItemAdded event for details.
FeatureActivated event on PublishingWeb
This event is used to trigger source site variation to target labels when the Publishing feature is activated on a site. This happens as well when a new Publishing site is provisioned inside the source label or if the feature is manually activated on a site that resides in the source label.
FeatureDeactivating event on PublishingWeb
This event is used to delete the relationship list entries and the variation specific properties when deactivating the publishing feature on a site.
WebDeleting event on PublishingWeb
This event is used to cancel a delete operation in case that the site being deleted is the Root Site of the Variation Hierarchy (if spawned labels exist) or a Top site of a Variation Label. In all other cases, the variation system uses this event to clean up the relationship list items for the deleted site and its pages.
WebMoving event on PublishingWeb
This event is used to cancel the move operation in case that the site being moved is the Top site of a Variation Label, as moving a Variation Top site would destroy the variation label it belongs to.
WebMoved event on PublishingWeb
This event is used to trigger source site variation to target labels if a site is moved from outside the source label into the source label. In addition, it will cleanup the information in the relationship list in case that a site is moved out of a variation label.