Part 1 - The BasicsPart 2 - User InterfacePart 3 - TriggersPart 4 - Timer JobsPart 5 - Configuration OverviewPart 6 - Configuration InternalsPart 7 - Variation Hierarchy CreationPart 8 - Creating Page VariantsPart 9 - Creating Site VariantsPart 10 - Restructuring the HierarchyPart 11 - Variations Fixup ToolPart 12 - CustomizationPart 13 - LoggingPart 14 - TroubleshootingPart 15 - "View Changes" ButtonPart 16 - Translation SupportPart 17 - MOSS 2007 vs. SP 2010Part 18 - FAQ
This lesson gives insights into the Variation specific View Changes ribbon action and how it determines the versions to compare.
It is important to understand that this button is always disabled if you see the button in context of a page which does not reside in a target variation label. You cannot use it (e.g.) in the source label. It is also disabled if the current page in the target label is a major version or if only one version has been propagated from source to target.
What the button allows you to do is to compare the most recently propagated source page version with the version of the source page which was last used to create an approved version in the target.
To give you an example:
The Diagram above shows the following actions:
The question is now: how does SharePoint know which versions to compare?
The variation system keeps track about the last propagated page version in two different places:
When a new version is variated to the target label the variation system adds/updates the relationships list entry of the created/updated target page.
The LastPropagateSourcePageVersion column of the relationships list entry will receive the version of the source page of the variation
When a new version is variated to the target label the variation system preserves the previous value of the PreviousSpawnSourcePageVersion property of the list item in the target page.
This property is changed by the ItemUpdated event receiver when the page is either approved or scheduled to go live in the future. The event receiver will then copy the value of the LastPropagateSourcePageVersion from the relationships list entry into this property.
That means the LastPropagateSourcePageVersion column in the relationships list always contains the version of the source page which was last variated to the target while the PreviousSpawnSourcePageVersion property of the target page always contains the version of the source page which was last propagated for the currently approved version in the target.
If both versions are the same, then the published version of the page in the target label is based on the last propagated source version.
If both versions are different, then at least one update has been propagated from source to target since the last version was published in target.
The View Changes ribbon action evaluates the version information stored in the LastPropagateSourcePageVersion column of the relationships list entry and in the PreviousSpawnSourcePageVersion property of the page.
If both are different it generates an url to the _layouts/VersionDiff.aspx page passing in information about the source page (list id and item id) and the information about the two different versions stored as listed above to create a comparison.
The VersionDiff.aspx page comes with SharePoint Foundation and allows to compare the content in the different columns of a list item using the VersionDiffIterator control.