SharePoint Variations
SharePoint Variations
0
0
0
Multilingual sites
Many companies operate globally, and even in their home market, companies often must appeal to
customers who speak different languages. This diversity often requires that publishing sites be tailored
for different cultures, markets, and geographic regions.
Multiple Devices
In addition, the importance of new internet connected devices like mobile phones, PDAs and internet
enabled media players becomes more and more important so presenting the same information in a
different layout on different target devices is mandatory for many customers.
Accuracy of Content
Another important factor is the accuracy of the content in the different languages, which requires the
integration with individual workflows, and an export and import functionality of the content for the
purpose of translation through external companies.
Understanding Variations
[The terms used in this paragraph are explained in the Terminology section below]
SharePoint Variations allows copying sites and content from the source variation label to one or more
target variation labels. By default, the variations feature copies only the site structure and publishing
pages from the Pages library of the source variation label.
The variations feature does not copy other site content, such as lists or other document libraries, unlike
the content deployment feature, which copies all content, including lists and other document libraries,
from one site to another.
It is possible to configure the variation feature to copy resources like images and documents bound to
publishing pages also to target variation sites but this will only work for documents and images which
reside in libraries and folders which also exist in the target site with the same site relative Url.
Another important difference between the variation feature and content deployment is that the copied
content in the target variation labels can be changed, unlike the content deployment feature, for which
changing copied content on the target is discouraged.
By default, when users navigate to the Variation Root Site, they are redirected to the appropriate top site
of a variation label, based on the language setting of their Web browser. For example, if a users default
browser language is French, SharePoint Server 2010 redirects that user to the top site of the French
variation label.
It is possible to customize this behavior by replacing or updating the redirection page responsible for the
routing with a different page. This new page can implement custom logic to redirect the user based on
other criteria (e.g. information from the User-Agent string).
We will discuss the details about how to achieve this in a later chapter.
Terminology
The Variation Feature allows tailoring publishing sites for different cultures, markets, languages, devices
or any other criteria defined by a customer.
Variation settings enable site owners to create and maintain a number of different variations, of the
same publishing sites or pages.
Variation Hierarchy
Exactly one variation hierarchy can be defined per site collection. It consists of a Variation Root and
sub trees for each of the variations which we refer to as variation labels.
Variation Labels
Variation labels are the names given to each of the variants. For example, variant labels could be
language names such as English, French, or German or devices such as PDA, mobile phone,
Internet Explorer or a combination of both like Spanish mobile phone, English Internet Explorer etc.
The flexibility is endless as the Variation system allows customers to define a custom routing logic to
decide to which label to redirect a user who browses the site (more details in a later chapter).
Up to 50 variation labels are supported in a site collection.
There are two different types of variation labels:
The Variation Top site is the root or upper most site in a variation label. All Variation Top sites in a
hierarchy are direct children of the Variation Root site and define the root of the hierarchy within a
variation label.
Variation Pages
Variation pages are the publishing pages that are stored in the Pages library of the source variation sites
and the target variation sites. These pages and any dependent resources such as images and documents
are the only content that is copied from the source label to the target labels.
Important: Storing non-publishing pages inside the Pages library of a site is unsupported! Non-publishing pages inside the Pag
label can cause the Variations Create Hierarchies Job Definition timer job to fail.
Page Variants
These are the peer pages bound together by the variation feature. Each variation label can contain one
variant of a page in the source label. If the item in the source label is updated the content of the source
page is automatically populated to the page variants in the target labels.
Variation Group
Each source site or page defines a separate variation group. All variants of the site or page in the
different labels belong to the same Variation Group.
Relationships List
The variation system needs to keep track about peer sites and pages to ensure that updates performed in
the source label are correctly transferred to the target label.
This tracking information is stored in the Relationships List. Each page or site in the variation hierarchy
is represented in the relationships list as a separate list item: the Relationships List Entry.
We will discuss the Relationships List in more detail in a later chapter.
November 15, 2011 by Stefan Goner // 2 Comments
Site Settings
The variation system adds three links to the site collection administration section of the site settings page
which will be discussed in further chapters:
Master pages
The variation system registers a delegate control in each of the default master pages to allow easy
integration of a variation label menu on publishing pages in the variation hierarchy:
Page Layouts
The variation system allows to associate page layouts with specific variation labels to allow the
implementation of different designs in different labels, to support different layouts for different devices,
languages (e.g. LTR vs. RTL support) and cultures:
Ribbon
The variation system extends the ribbon with additional operations related to the current publishing
page:
0
0
0
Class: Microsoft.SharePoint.Publishing.Internal.SpawnSitesJobDefinition
For backward compatibility reasons the class still supports Timer job definitions developed without the
pausing functionality in mind.
In SharePoint 2010 the actual Timer job derived from SPWorkItemJobDefinition only has to
implement two methods: WorkItemType() which returns the unique ID of the work item type that
should be processed in the timer job, and ProcessWorkItem() which processes one single work item of
the defined type.
The framework provided in the SPWorkItemJobDefinition base class handles the rest of the processing
like reading the work items from the database, updating the Timer job progress (visible as progress bar
in the central admin), pausing and resume.
Workitem Type
CreateVariationHierarchiesJobDefinition
E7496BE8-22A8-45BF-843A-D1BD83ACEB25
CreateVariationSiteJobDefinition
943D4A28-4147-4A73-B4D1-4A9162D4ECE2
CreateVariationPageJobDefinition
726ddd8f-0e23-4c35-88b5-4fba39482515
PropogateVariationPageJobDefinition
EA95AB64-3857-4403-96D0-3AEB3DBDB123
SpawnSitesJobDefinition
5A4B0E0E-0579-4a5d-B233-C2932F031912
November 18, 2011 by Stefan Goner // 0 Comments
Variation Home
Here you can configure the Variation Root Site. After the variation root site has been selected and a
variations hierarchy has been created, the root site cannot be changed.
Automatic Creation
Determines whether sites and pages on the source variation site are created automatically on the target
variation sites. By default, this option is enabled.
If you disable this option, sites and pages that are created on the source variation site are not
automatically variated to the target. You have to create the site and page variants manually using UI
actions provided by the variation system.
Note: This option only controls the creation of peer pages not the update. If a user decided to create a peer page in a targ
automatically), all updates to the source page will still automatically be propagated to the target label. This functionality w
MOSS 2007 and led to different workarounds like disabling the page propagation timerjob (which is responsible to copy t
labels) or creating a dummy source label to allow updates in all productive labels without affecting the content in the targe
In SP2010 the additional configuration the Disable Automatic Propagation option has been introduced to overcome this
control whether content updates in the source label will be automatically propagated to the target label or not. If automatic
disabled then the Automatic Creation option is ignored for pages (but it is still used for sites). Neither new nor updated p
target labels.
Unfortunately this option is not available in the UI it has to be set using object model:
Disable automatic propagation:
$rootWeb = Get-SPWeb http://url-to-sitecollection
$relationshipsList = $rootWeb.Lists[Relationships List]
$propertyStore = $relationshipsList.RootFolder
$propertyStore.Properties.Add(DisableAutomaticPropagation, True)
$propertyStore.Update();
Notification
Sends e-mail to the contact of the welcome page of a target variation site when a new page or site is
created or to the contact person of the specified page when a page is updated. By default, this option is
enabled.
Resources
Specifies whether to use the same resources on the source variation site when pages are copied to target
label or to copy them to the target label as well. Only Resources in libraries, which are provisioned with
the containing site, can be copied to the target, as the variation system does not have an option to vary
libraries. For standard publishing sites, only images and documents in the Publishing Images and
Documents library can be copied. By default, this option is set to reference existing resources.
Using the variation labels page it is possible to create new variation labels, to edit or delete existing
variation labels and to initiate the creation of the variation hierarchy for the defined variation labels.
The Create Variation Label page allows to configure the following options:
Label Name
The label name will be used as URL name of the variation top site for the new variation label. Only
characters which are allowed in a URL can be used for the Label name. A friendly name with other
characters can be configured as the Display Name.
Display Name
The display name is the friendly name of the new variation label. Here you can use also characters,
which are not allowed in an URL. The friendly name will be used as Title for the variation top site of the
label.
Locale
This setting allows to configure the locale settings for the sites provisioned in the new variation label.
Hierarchy Creation
This setting is not available in the UI if a source variation label has been defined but the hierarchy of the
source variation hierarchy has not yet been created.
This setting influences the creation of the hierarchy of labels added after the initial hierarchy creation
was done.
In such a situation, it is possible to define whether the new label:
should get a copy of all sites and pages in the source hierarchy, or
if only the site structure should be replicated, or
if only the top site should be created
Source Variation
The options in this section are disabled as soon as a source variation label has been defined as only one
source variation label can exist per site collection.
Using the settings in this section, you can define whether the new label will be the source variation label
or a target label.
If the new label is the source label, you can also select a publishing site template to be used when
provisioning the variation top site of the different labels.
Configuration Storage
Important: Be aware that direct modification of the settings mentioned below without going through the SharePoint UI is not sup
If you find an inconsistency in one of these settings and you cannot resolve it using the UI you should open a support case with Mi
analyzed and fixed in a supported manner.
The variation system uses seven different places to store configuration information
1. Property bag of root site of site collection
2.
3.
4.
5.
_VarRelationshipsListId
This property contains the unique ID of the Relationships List. Most code
parts in the Variation System use the value in this property to access the
Relationships List rather than the Url name.
_VarLabelsListId
This property contains the unique ID of the Variation Labels List. The
Variation System always uses the value in this property to access the
Variation Labels list.
DeploymentInProgress_SiteId
This property exists while a content deployment job performs an import
operation into the current site collection is active. After the import is
completed the property will be removed. The variation system checks this
property in context of autospawning of created pages and sites. Authoring
actions during import operations are discouraged as sites and pages created
by authors while an import operation is running will not be automatically
spawned to the target sites.
Note: Parallel execution of content deployment imports can cause a problem, as the first finishing job will
UpdateWebPartsPropertyName
This property stores the configuration setting for the Update Target Page
Web Parts option on the variation settings page.
Default Value: True
AutoSpawnStopAfterDeletePropertyName
This property stores the configuration setting for the Recreate Deleted
Target Page option on the variation settings page.Default: False
SourceVarRootWebTemplatePropertyName
This property stores the configuration setting site template to be used for the
top sites of each label. This setting is configured when defining the source
label rather than in the variation settings page.
Default Value: CMSPUBLISHING#0
CopyResourcesPropertyName
This property stores the configuration setting for the Resources option on
the variation settings page.
Default: False
EnableAutoSpawnPropertyName
This property stores the configuration setting for the Automatic Creation
option on the variation settings page.
Default: True
SendNotificationEmailPropertyName
This property stores the configuration setting for the Notification option on
the variation settings page.
Default: True
DisableAutomaticPropagation
This property can be used to disable automatic variation of content changes
and new pages to the target labels. If this property is set to True then the only
way to vary content changes to the target pages is through a manual update
in the UI. This setting can only be configured using object model.
Default: False
TranslateFields
This property is used when leveraging external translation services to flag
specific columns to be translatable. The information about the translatable
fields are stored in this property in Xml format. Translatable columns are
covered in Module 10.
Note: Storing the variation root in a link field has the benefit that it is possible to move around the variation
feature of site manager will automatically adjust all links to the moved item including the link in the Rela
The same benefit applies to all peered sites and pages. Moving them around using site manager will not bre
pages will be propagated to the moved target pages automatically.
Variation Group Id
The Id of the Variation Group assigned to the site and its peers.
Variation Group ID
The Id of the Variation Group assigned to the page and its peers.
Relationships List
SharePoint needs to keep track of the associations between sites and pages in the different variation
labels to ensure that changes done to the source variation are automatically propagated to the target
labels.
This association data is kept in a hidden list in the root of the site collection named Relationships List.
You can view the content of this list by navigating to the following URL:
http://url-to-site-collection/Relationships%20List
The All Items view only contains the Title column of the list elements which is always empty.
To view the content in this list more effectively you should create a new view (you should not change
the All Items view) where all the columns are enabled.
To identify which of the entries are variation peers have a look at the GroupGuid column. All peers have
the same Id in the GroupGuid column.
Note: The variation root site is also represented in the Relationships List. The GroupGuid column for the variation root site always
2DCC-4894-B67D-BBAED5A066F9}.
The Variation retrieves the list item with this well-known Guid above to locate the variation root site
Important Fields
GroupGuid
This field allows to find peers for a given page. All peers have the same
GroupGuid value.
In addition, a well-known Guid in this GroupGuid value identifies the
variation root site.
ObjectID
This is a link field. The hyperlink in this link field points to the associated site
or item in the variation hierarchy. The text value of the field represents the
location of the item when it was first added to the variation hierarchy.
ParentAreaID
The content of this field is currently not used by the variation system.
This is a link field. The hyperlink in this field points to the parent area of the
associated item when it was first added to the variation hierarchy. The
hyperlink and text value is not updated when the associated item or site is
moved to another site in the hierarchy.
This field is empty for the variation root site.
LastPropagatedSourcePageVersion
This text field is empty if the list item represents an element in the source
variation hierarchy or a site in a target hierarchy. If the list item represents a
document in the target label it will contain the version of the item in the
source label used to propagate this target item.
Deleted
This field is used to track whether a variant of an item has been deleted in a
label to prevent it from being recreated if the user configured Recreate
Deleted Target Page to false.
Each variation label is represented by one list item in the variation labels list and the configuration for
each label is stored in the fields of the list item.
Important Fields
Label (StaticName: Title)
This text field contains the Name of the label, which is used for the URL to the
top site.
Flag Control Display Name
This text field contains the Title of the variation top site. This value is also use
in
theMicrosoft.SharePoint.Publishing.WebControls.VariationDataSource class,
which can be used to implement navigation between the variation labels. I
will discuss this in more details in a later part.
Hierarchy Is Created
This Yes/No field is No at the beginning and changed to Yes by
the CreateVariationHierarchiesJobDefinition timer job after the hierarchy for
the label has been created.
Is Source
This Yes/No field defines whether the label represented by this list item is a
source or target label.
Language
This text field contains the configured language (selected language pack)
configured for the label.
Locale
This text field contains the configured locale for the label.
Note: Be aware that this method will also create all lists and documents, which are defined in the site temp
label uses normal SharePoint provisioning methods using the same template to create the site in the target la
target label will not be syncd with the items from the source label.
Overview
In order to create the hierarchies you first need to configure the variation labels, which should be
spawned. At least the source Variation Label has to be configured in order to create the hierarchies.
Important: The creation of the hierarchies will fail if a site exists inside the Variation root site with the same name as one of the va
to be spawned.
The Create Hierarchies button in the UI will create a Scheduled Work Item in the Content Database of
the site collection which is later retrieved by the CreateVariationHierarchiesJobDefinition timer job to
do the actual creation of the hierarchy.
Per default, the timer job is configured to run once a day between 12 AM and 3 AM that means a user
will usually have to wait until the next day for the hierarchy creation to happen.
Alternatively, a farm administrator can run the job manually at any given time from the central admin
site.
Creating the Variation Top site for the source variation label
The Timer Job first verifies if the top site of the source label already exists and will skip the rest of the
steps if yes.
After checking that the top site does not exist, it will disable the automatic spawning of new created sites
to the target labels to ensure that the Timer Job responsible to perform the site spawning does not pick
up the new site while the hierarchy is not fully created.
The next step is to provision a new publishing site based on site template, locale and language
configured in the variation settings. The title of the site will be the configured display name of the
variation label.
The new site will then be marked as being a member of the variation hierarchy and a new entry for the
site is created in the global Relationships List.
Afterwards the new site is configured as variation top site of the label and the hierarchy of the label will
be marked as created.
The final step is to re-enable the automatic spawning of new created sites to the target labels.
Here is the high-level description of how the replication is done by the timer job. Be aware that some of
these operations are also performed in the other timer jobs, which are responsible to replicate only sites
or pages:
For each unspawned target label, we perform the following steps:
1. Provision the top site in the target label using the same template as on the source
label using the Display Name, locale and language configured for the target label
2. Ensure that the new site has the same configuration (variation group id, welcome
page, features, navigation, UIVersion, Master page, Theme) as the peer site in the
source label
3. The new site will then be marked as being a member of the variation hierarchy and a
new entry for the site is created in the global Relationships List
4. Pair up the pages created while provisioning the site with the equivalent items in the
source site by assigning the same variation group ID to both and copy the page
content from source to target label using the content deployment and migration API
5. Recursively provision all sites that exist below the variation top site in the source
label to the target label and copy all pages in the pages library using the content
deployment and migration API. If required adjust the page layout of the page based on
the page layout configuration for the different labels
6. Afterwards the new top site is configured as variation top site of the label and the
hierarchy of the label will be marked as created
Note: Be aware that the pages in the target label will not be a one-to-one copy of the pages in the source label. Certain field and pr
has to be possible to have different values in source and target. Here is a list of the fields which are not overwritten when creating/u
Title, Description, StartDate, EndDate, Layout, Audience, Contact, LocalContactName, LocalContactEmail, LocalContactIma
PreviousSpawnSourcePageVersion, FieldId.DocumentId, FieldId.AverageRatings, FieldId.RatingsCount
A new page is added to the source variation label and the following settings are configured:
Automatically create site and page variations is enabled
Note: Be aware that automatic propagation will not happen if moderation and minor versions are disabled and also the requiremen
items when updating the item is disabled. The reason is that in this situation the ItemCheckedIn event will not fire as not check-in
As discussed in an Part 4 the event receiver will create a Scheduled Work Item for
the PropogateVariationPageJobDefinition which will perform the content propagation. The same
timer job is also responsible to propagate changes done to existing pages in the source label to the target
label.
Note: You can also create page variants using the Update button in the ribbon. Be aware that this will automatically create/update
labels. This option does not only update existing peers but also create new peers in labels where the page has not been variated to u
similar to the automatic creation mode.
This behavior prevents granular content updates to existing peers in case that DisableAutomaticPropagation is set to True.
Both options redirect to the _layouts/CreatePage.aspx page passing in details about the original item
for which the variant should be created like item id, list id, web id and folder the item resides in:
When creating a page variant manually it is possible to select a different but compatible page layout
(means a page layout associated with the same content type). You can also choose a different Url name,
title and description but not a different site and folder relative path. The page will be created in the peer
site of the source site and the same folder in the pages library as the item in the source site. If a different
folder location is required you can move the item to the desired folder after it got replicate to the target
label.
It is also possible to specify for each created page variant whether to copy the resources used in the page
to the target label or to reference them in the source label.
The settings choosen on the page will be passed to the CreateVariationPageJobDefinition timer job
within the Scheduled Work Item.
Important: Using this action the page will be propagated to all target variation labels. Unlike automatic update operations that mea
be created in labels which did not have a page variant before the update operation.
In this case, the site creation activates the Publishing Feature, which is invokes
theFeatureActivated event handler of the
Microsoft.SharePoint.Publishing.PublishingFeatureHandler class which initiates the spawning of
the site.
The Publishing Feature is activated on a site which resides in the source hierarchy
In this case, the creation is the same as for the previous scenario. That means activating the
Publishing feature on a site (e.g. team) in the variation source hierarchy will automatically initiate
the creation of variant sites in the target labels.
A site which has the Publishing feature activated is moved into the source hierarchy
In this case, the spawning of the site is initiated from the WebMoved event implemented in the
Microsoft.SharePoint.Publishing.CPVAreaEventReceiver class. This event is bound to all sites
that have the Publishing feature activated.
As discussed in Part 4 the event receivers above will create a Scheduled Work Item for
theSpawnSitesJobDefinition timer job which will perform the site propagation.
When creating a site variant manually it is possible to select a different Title and a different URL name
for the site in the target label. The site will always be created in the peer site of the parent site in the
source label. If a different location in the target label is required it is possible to move the site to a
different location later without breaking the variation link between the sites and without affecting the
ability to create variant pages later.
The settings chosen on the page will be passed to the CreateVariationSiteJobDefinition timer job
within the Scheduled Work Item.
I will explain the actions performed when restructuring the source hierarchy, discuss how the variation
consistency is preserved when the structural changes are applied and explain which actions can break the
consistency between source and target labels
The following actions are covered in this article:
I will not go into the details of the link management as I have explained these details in the following
blog already: Deep Dive into the SharePoint Content Deployment and Migration API Part 4
One specialty in this operation is that the link management checks if the link to the item comes from an
item in the relationships list. If the link comes from the relationships list, the link management verifies if
the move operations went beyond the boundary of a variation label and only updates the link if source
and target of the move operation is in the same variation label.
This is necessary to support the maintenance of relationships list items in the final step of the move
operation, which is discussed below.
ItemDeleting This event fires after Site Manager has copied the item to the new location, fixed
the links pointing to the item and is about to delete the original item to complete the move
operation.
The publishing feature has bound
the Microsoft.SharePoint.Publishing.PagesListCPVEventReceiver.ItemDeleting event receiver
to this event to gather the Variation Group Id from the page that is going to be deleted and make it
available to the ItemDeleted event handler, which fires after the delete operation has been
completed.
ItemDeleted This event is fired after the original page has been deleted.
The publishing feature has bound
the Microsoft.SharePoint.Publishing.PagesListCPVEventReceiver.ItemDeleted event receiver
to this event, which is responsible to maintain the relationships list references in case that the move
operation moved an item out of a variation label. In this situation, the item is no longer a member
of the previous variation group and the relationships list entry has to be updated accordingly.
In case that an item that resided in the source variation label was moved out of the source label all
relationships list entries for the variation group of the moved items will be recycled means
neither the item in the source label nor the items in the target labels are variation hierarchy items
after the move.
In case that the move operation for an item in the target variation label went beyond the boundaries
of its label the list item in the Relationships List is marked as deleted (Deleted column gets value
Yes). This flag is used in combination of the setting, which controls whether to recreate deleted
target items, or not.
WebMoving This event fires before the actual move operation is performed within the COM
layer.
The publishing feature has bound
the Microsoft.SharePoint.Publishing.CPVAreaEventReceiver.WebMoving event receiver to
this event, which checks if the site being moved is a variation top site and cancels the move
operation in this case.
Note: In case that the Variation Root site is not identical with the root site of the site collection it is possible to move the Variation
well. The configuration setting for the variation root site will automatically be updates as it is stored as hyperlink in a list item in th
be adjusted through the same mechanism as other hyperlinks pointing to the site.
WebMoved This event handler fires after the move operation has been completed.
The publishing feature has bound
the Microsoft.SharePoint.Publishing.CPVAreaEventReceiver.WebMoved event receiver to this
event which is responsible to maintain the relationships list references in case that the move
operation moved a site out of a variation label. In this situation, the site is no longer a member of
the previous variation group and the relationships list entries of the site and all child sites and child
pages have to be deleted.
In case that a move operation moved a site, from outside the source label into the source label (as
well from a target label and from a location outside the variation hierarchy), this event handler is
responsible to mark the site as being a part of the source label and will also initiate the spawn of
the moved site to the target labels.
Important: Moving a site out of the variation hierarchy especially moving it out of the source label is a not reversibl
removed from the site and all included sub sites and pages and as the relationships list entries are removed you cannot
location and assume that everything is back to normal.
If such a move is performed by accident it usually requires to restore a backup taken before the move operation to roll
In case that a publishing page in the source variation label has been deleted it is necessary to recycle all
relationships list entries for the variation group of the deleted page as these pages can no longer be
updated after their source page has been deleted.
Delete operations for Publishing pages through the UI or through object model can either use the recycle
bin (SPFile.Recycle method) or can be a final delete without a chance to recover the item
(SPFile.Delete method). Both methods will raise the ItemDeleting and ItemDeletedevents.
The variation system hooks up to the following events to maintain the relationships list items during a
delete operation:
ItemDeleting This event fires when the WSS object model is about to delete or recycles the
page
The publishing feature has bound
the Microsoft.SharePoint.Publishing.PagesListCPVEventReceiver.ItemDeleting event receiver
to this event to gather the Variation Group Id from the page that is going to be deleted and make it
available to the ItemDeleted event handler, which fires after the delete operation has been
completed.
ItemDeleted This event fires after the WSS object model has deleted the page
The publishing feature has bound
the Microsoft.SharePoint.Publishing.PagesListCPVEventReceiver.ItemDeleted event receiver
to this event, which is responsible to maintain the relationships list references for the deleted items.
In case that a page in the source variation label has been deleted, all relationships list entries for
the variation group of the deleted item are recycled means neither the item which was deleted in
the source label nor the items in the target labels are variation hierarchy items after the delete.
In case that a page in a target label has been deleted, the list item in the Relationships List is
marked as deleted (Deleted column set to Yes). This flag is used in combination of the setting,
which controls whether to recreate deleted target items, or not.
Restore Operation
In case of a restore operation it is necessary to ensure that the deleted status in its relationships list item
is removed to ensure that future updates work correct and that a user cannot create a new page variant in
the same label.
Important: Take special care when restoring a page in a target label. If the page has been moved to a different location before it go
been recreated in the target label, you will end up with two pages in the same label for the same variation group.
This is not supported and can lead to exceptions.
The restore operation fires the ItemAdded event in the list where the restored item gets restored into.
The variation system hooks up to the following events to maintain the relationships list items during a
delete operation:
ItemAdded - This event fires after the item has been successfully restored in the pages library
WebDeleting This event fires for each site that is going to be deleted. In case that a site is
deleted, which contains subsites, and then this event fires for each subsite as well. When
performing the delete from within Site Manager the delete starts at the leaves meaning, the
deepest sites in the hierarchy are deleted first and the WebDeleting event for these leave sites fires
first as well.
The publishing feature has bound
the Microsoft.SharePoint.Publishing.CPVAreaEventReceiver.WebDeleting event receiver to
this event which first checks if the site being deleted is the variation root site and cancels the delete
in case that there are any spawned variation labels. If there are no spawned variation labels, the
event handler removes the variation root site URL from the variation settings and allows the delete
operation to continue.
The next thing checked is if the site being deleted is a variation top site of a variation label and
cancels the delete in this case as the delete of the top site would invalidate the variation label
Important: As mentioned above the delete will start at the leaves when deleting the site in Site Manager. That means t
when the event handler cancels the delete operation because it identifies that the site to be deleted is the top site of a la
hierarchy.
In case, that the delete operation is valid the WebDeleting event handler cleans up the
relationships list items for the site and all included pages.
Note: Unlike the delete operation for sites the cleanup of relationships list entries does not happen in the after event
before event. That means if the delete is not performed for whatever reason (e.g. because another event handler canc
inconsistent relationships list as the relationships list entries for the site and all its pages is already gone.
Restore Operation
The option to restore sites and site collections has been added with SharePoint 2010 Service Pack 1.
Unfortunately the Variation Feature currently does not support this functionality which means that a site
restore from the recycle bin will not be part of the variation hierarchy as the relationships list entries for
the site and included pages will not be recreated.
Important: Similar to move operations which went beyond outside of a variation label it usually requires to restore a backup from
to roll back the changes.
You cannot just restore the site from the recycle bin as the relationships list entries will not be recreated.
Deletion of a variation label is a synchronous operation, which is handled within the http request that initiated it.
The operation is not performed in a timer job and is not implemented as a long running operation, which would be executed on a se
The side effect of this limitation is that with large hierarchies it can happen that the operation takes more time than the standard req
seconds).
In such a situation, the variation cleanup operation will not be completed successfully before ASP.NET terminates the http request.
Workaround: You can increase the execution timeout value by modifying the web.config file in the _layouts directory by adding th
10 hours):
<configuration>
<location path=VariationLabels.aspx>
<system.web>
<httpRuntime executionTimeout=36000 />
</system.web>
</location>
<configuration>
You also should disable application pool recycling option while the label delete operation is executed.
Usage
The Variations Fixup Tool has been integrated into stsadm.exe to allow administrators to fix common
variation problems, which are caused by inconsistencies between the actual site structure and the data
stored in the relationships list.
The tool has four different operation modes:
Scan This operation mode can be used to analyze the variations hierarchy and report identified
problems
This parameter provides functionality that cannot be accessed using the Central Administration
Web site.
Fix Corrects identified problems. If the recurse parameter is used, fixes are done recursively for
all sub-sites
This parameter provides functionality that cannot be accessed using the Central Administration
Web site.
Spawn This operation mode creates new variations for a site in the source variation label
specified by the URL parameter. New peers are created for either all or one specific target
variations label. If the recurse parameter is used, variations for sub-sites and pages are also created
This operation mode is equivalent to the New Variation Site user interface setting that is located
on the Site Content and Structure page.
ShowRunningJobs Displays current status of Variations Propagate Page Job Definition and
Variations Propagate Site Job Definition timer jobs that are located on the Timer Job Status page
of the SharePoint Central Administration Web site
The command supports the following parameters to configure these operation modes:
URL The URL of a site in the source variation label where variations system data is being
analyzed or corrected. This parameter is required for all operation modes
Label the variation label to operate on. This parameter is supported by the following operation
modes: Scan, Fix, Spawn
Recurse whether to perform the operation recursively or not. This parameter is supported by the
following operation modes: Scan, Fix, Spawn
In order to use the command correctly it is important to understand what the different operation modes
do.
ShowRunningJobs
This command enumerates all running jobs for all the automatic propagation jobs for sites and pages:
Scan
This command analyzes sites and pages in the variation source hierarchy.
For each Site/Page, it reports:
If the source site is marked as being in the source variation hierarchy
(SPWeb.AllProperties[__InSourceHierarchy] == True ?). If the site is marked as being in the
source hierarchy means that the page is part of the source hierarchy.
The Variation Group Id of the source site or page
(SPWeb.AllProperties[Variation Group Id] or
PublishingPage.ListItem[FieldId.VariationGroupId])
Which peers are registered in the relationships list with same Variation Group Id
If a variation peer exists in the configured labels (default is all spawned labels) by first checking if
a peer is configured in the relationships list with the same variation group ID for the given label. If
no peer can be found using the relationships list we try to lookup the peer using the default URL
that would be used when creating a variant in the given label
The variation group id of the variation peers in the target labels (SPWeb.AllProperties[Variation
Group Id] or PublishingPage.ListItem[FieldId.VariationGroupId])
If the source site/page is configured in the relationships list
In addition the command reports the variation labels used for the peer check (default is all spawned
labels).
The tool will not identify any issues it is required to analyze the report in detail and interpret it in order
to find problems.
Fix
This operation mode invokes the same method as the Scan operation mode but beside analyzing and
reporting the issues it will invoke fix routines for sites and pages.
It is important to understand which types of issues are fixed and which are not.
The following issues are automatically fixed:
Any other problem in the variation hierarchy is not fixed by this operation mode. E.g. fix mode will not
create missing variation peers.
Spawn
This operation mode allows spawning an existing site in the source label to one or all spawned target
labels. The operation mode is similar to the New Variation Site option available in Site Content and
Structure.
Be aware that this operation mode cannot be used to spawn pages in already spawned sites. In case that page variations are miss
variations fixup tool to recreate them. You have to manually create/recreate them using the UI.
The command initiates the site spawn operation by creating a scheduled work item for the
SpawnSiteJobDefinition timerjob. The spawn will be performed as soon as the timerjob runs.
The difference between the scheduled work item created by the CPVAreaEventReceiver and the
Variationsfixuptool is that the tool has the option to create a workitem, which only spawns the site to one
specific variation rather than to all spawned variation labels.
A common use scenario is to configure the source variation label with the Hierarchy Creation option to
create only the root site and not the complete hierarchy and later to spawn the hierarchy or parts of the
hierarchy from the source label using the STSADM command.
In MOSS 2007, this command was a major benefit compared to the automatic hierarchy creation in the
UI, as it was the only way to force the creation in OWSTIMER rather than W3WP.
With SharePoint 2010 where all actions are already in OWSTIMER the benefit of using the STSADM
command rather than the UI is rather limited.
Summary
The variations fixup tool allows to create a report (-Scan) about all items in the source label including
their variation group id, whether they have a reference in the relationships list and all peer pages with the
same variation group id in the configured labels. The tool will not automatically report problems but
requires an engineer to analyze the report and identify issues bases on his experiences.
The tool also allows to report which site and page propagation jobs are running (-ShowRunningJobs)
when the command is executed and the status the job is in. On the other hand, the tool does not report
anything regarding the other variation timer jobs (create hierarchy, create site, create page).
The tool allows to fix issues related to inconsistencies between items in the source and target site and the
relationships list (-Fix).
On the other hand, this command will not fix any other types of inconsistencies e.g. missing items in
the source or target label.
The tool also allows to spawn a site or a site hierarchy including the pages from the source to either all
spawned target labels or a specific target label by creating a scheduled work item for the
SpawnSiteJobDefinition timer job.
Part 3 Triggers
Part 4 Timer Jobs
Part 5 Configuration Overview
Part 6 Configuration Internals
Part 7 Variation Hierarchy Creation
Part 8 Creating Page Variants
Part 9 Creating Site Variants
Part 10 Restructuring the Hierarchy
Part 11 Variations Fixup Tool
Part 12 Customization
Part 13 Logging
Part 14 Troubleshooting
Part 15 View Changes Button
Part 16 Translation Support
Part 17 MOSS 2007 vs. SP 2010
Part 18 FAQ
This module explains supported ways to implement customizations in the variation system.
You can apply the following types of customization:
Custom routing logic for the landing page in the variation root site
A custom menu to allow switching between the variation labels
Implement Variation Aware web parts
Add event receivers to apply modification to items in the target label after they got replicated.
A page named VariationRoot.aspx is created in the pages library of the variation root site based
on the VariationRootPageLayout.aspx page layout file in the Master Page and Page Layouts
Gallery
The Welcome page URL of the Variation root site is configured to point to the VariationRoot.aspx
page
If a user navigates to the Variation root site, SharePoint Server 2010 looks up the configure Welcome
Page of the site and redirects to the VariationRoot.aspx page. As this page is based on
VariationRootPageLayout.aspx, it executes the logic in the page layout file.
The VariationRootPageLayout.aspx page layout contains a reference to a file
called VariationsRootLanding.ascx file, which resides on the file system in
The default logic used in the VariationsRootLanding.ascx file is to redirect the user to the Variation site
that matches the browsers accepted languages.
An additional customization might be to place the logic into a custom assembly and deploy this using a
feature into the Global Assembly Cache of all machines. Then you can reference this custom code either
from the user control or directly from the VariationRootPageLayout.aspx page.
Master Page
Each of the default master pages contains a reference to a file called VariationsLabelMenu.ascx, through
a DelegateControl element in their markup:
<SharePoint:DelegateControl runat=server ID=GlobalDelegate0
ControlId=GlobalSiteLink0 />
Delegate Control
The publishing feature registers the DelegateControl GlobalSiteLink0 element
in \14\TEMPLATE\FEATURES\Publishing\VariationsFlagControl.xml. This XML file points to the
VariationsLabelMenu.ascx file, which causes all sites provisioned with the publishing feature to have the
rendering provided by VariationsLabelMenu.ascx. This also causes the master pages for all publishing
site collections in the server farm to contain the same rendering provided by VariationsLabelMenu.ascx.
\14\TEMPLATE\FEATURES\Publishing\VariationsFlagControl.xml
<! _lcid=1033 _version=14.0.4750 _dal=1 >
<! _LocalBinding >
<Elements xmlns=http://schemas.microsoft.com/sharepoint/>
<Control
Sequence=50
Id=GlobalSiteLink0
ControlSrc=~/_controltemplates/VariationsLabelMenu.ascx>
</Control>
<Control
Sequence=50
Id=VariationsFlagControl
ControlSrc=~/_controltemplates/VariationsLabelMenu.ascx>
</Control>
</Elements>
As you can see the same user control is registered with two different control Ids: GlobalSiteLink0 and
VariationsFlagControl. It does not matter which Id you use in your master pages both will work.
Because the Delegate controls are the same for all publishing sites in all site collections, they all
reference the same user control on the file system, the rendering cannot vary from site collection to site
collection with default setup.
VariationsLabelMenu.ascx
The VariationsLabelMenu.ascx file needs to contain the logic to render variation label menu on the page.
Per default only the VariationDataSource control is embedded in this control but not a rendering control
to leverage this data source. So per default no variation labels menu is displayed.
In order to display the variation labels menu it is required to update the VariationsLabelMenu.ascx and
add a reference to a rendering control for the data source.
We will discuss supported methods to customize this control in the next sections.
VariationDataSource
The VariationDataSource control is not a rendering control. It acts as data source for other web controls,
which support data binding like a Repeater, or a DataList control.
It provides information about peers of the current page in other variation labels.
This data source can be utilized by different controls like an ASP.NET Repeater or a DataList control or
the VariationsLabelEcbMenu shipped with SharePoint.
<cms:VariationDataSource id=LabelMenuDataSource LabelMenuConfiguration=1
Filter= runat=server/>
Link to Peers: this is the default and most common operation mode. In this mode, the data source
returns links to peer pages of the current page.
LabelMenuConfiguration=1
Link to Parent: using this operation mode the data source returns links to the peers of the parent
site. That link will not point to the peer page but to the peer site of the current site.
LabelMenuConfiguration=2
Link to Top Site: using this operation mode the data source returns links to the top sites of peer
labels.
LabelMenuConfiguration=3
Filtering
The variation data source supports filtering on the label result set. If e.g. administrative labels exist in the
hierarchy, which should not be exposed to users, then you can create a regular expression filter on the
label name to exclude them from the view, which means that the data source will not return links to peer
pages in the filtered labels. A simple filter could be ^\w. This filter will only display labels which start
with alphanumeric characters (a-z, A-Z, 0-9). Labels starting (e.g.) with a special character like - will
not be displayed.
Rendering Control
We will discuss how to use the VariationDataSource with a rendering control in the next sections.
The change has to be done on all WFEs and if a change is required, it is necessary to update the files on
all WFEs.
<SafeMode >
<! Marks VariationsLabelMenu.ascx for compilation. >
<PageParserPaths>
<PageParserPath
VirtualPath=/_catalogs/masterpage/VariationsLabelMenu.ascx
CompilationMode=Always
AllowServerSideScript=True
AllowUnsafeControls=False />
</PageParserPaths>
</SafeMode>
</SharePoint>
As you can see, the VariationDataSource control is included but no rendering control is available to
render links to peer pages or sites.
VariationsLabelEcbMenu
In SharePoint 2007, the file looked slightly different:
<%@ Control Language=C# %>
<%@Assembly Name=Microsoft.SharePoint.Publishing, Version=12.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c%>
<%@Register TagPrefix=CMS Assembly=Microsoft.SharePoint.Publishing,
Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
namespace=Microsoft.SharePoint.Publishing.WebControls%>
<% <cms:VariationsLabelEcbMenu id =varlabelmenu1 DataSourceID=LabelMenuDataSource
DisplayText=<%$Resources:cms,VariationLabelMenuTitle%> IsCallbackMode=true
runat=server /> %>
<cms:VariationDataSource id=LabelMenuDataSource LabelMenuConfiguration=1
Filter= runat=server/>
As you can see, the user control contained a commented reference to the VariationsLabelEcbMenu,
which utilized the VariationDataSource.
In SharePoint 2010, the VariationsLabelEcbMenu is still available but marked as deprecated.
That means your existing applications still work (at least with the current version) but it is recommended
to use a different control for future implementations.
Many customer have special needs to render the variation labels (e.g. to render a flag beside the label
name) which cannot be done with this control.
Using the standard ASP.NET controls gives much more control of the generated html.
Each Container object in the item template supports the following public properties:
Each of these properties can be used inside the ItemTemplate for the rendering of the current Variation
link node.
The Repeater control supports two different templates: one to be used for each of the elements in the
collection the repeater iterates over, and one, which will be used as a separator between the elements.
In the sample above, we just use a vertical bar as separator, which is a nice way to separate entries in a
horizontal list. Alternatively, you can embed the repeater in a html table and use column/row end/start
tags in the separator template.
This error occurs as with all controls, which perform databinding on first load including the
VariationsLabelEcbMenu if CallbackMode is disabled.
Note: The IsCallbackMode attribute of the VariationLabelEcbMenu controls whether databinding is performed with ever
user clicks the dropdown rendered by the menu.
See my previous post for more details and workaround of this problem.
Variation Logs
The variation system logs status information into the hidden Long Running Operation Status list in the
root of the site collection. Most problems related to variations are reflected in this log.
The Variation logs can be inspected through a link in the Site Collection Administration section of the
Site Settings page:
The variation log uses a GridView control to display a filtered view of the Long Running Operation
Status list using a SPDataSource control. The data source returns all rows from the Long Running
Operation Status list where the Type Of Job column contains the string Variation. Newest entries are
listed first.
Success messages and Failures are listed in separate columns, which give easy access to the information
if a problem has occurred with recent propagations:
ULS Log
In case that the information in the Variation Log is not sufficient to isolate a variation problem, it is
possible to leverage the SharePoint Unified Logging Service (ULS) to get additional logging
information.
Both the Variations Infrastructure and the Content Deployment and Migration API (which is used to
perform export and import operations during page propagation) use the ULS log to report problems
using the following categories:
For the Content Deployment and Migration API:
SharePoint Foundation\Content Migration
SharePoint Foundation\Topology
For the Variations Feature:
You can use ULS Viewer to conveniently analyze ULS log files.
The most important category is Site Management. You should filter the ULS log for this category first. If
this does not give you relevant information, add the other two WCM categories on top. If the problem is
related to problems occurring during export/import, you need to add the two SharePoint Foundation
categories as well.
Propagation Problems
Variation Hierarchy is not created
Automatic Page/Site propagation does not work
Manual Page/Site propagation does not work
Variation Label menu does not show correct results
Variation landing page redirection does not work correct
General steps
1. Check the Variation Log (see part 13 for details)
2. Check the ULS log for problems (see part 13 for the required categories)
3. Use STSADM -o variationsfixuptool -scan to analyze variation inconsistencies which might be
related to the problem
Note: You can use powershell to dump a filtered timerjob list for your web application, which contains the relevant inform
command dumps the information about the variation timerjobs for the web application on port 1007:
PS> (get-spwebapplication http://servername).JobDefinitions | where {$_.DisplayName -matc
DisplayName, IsDisabled, LastRunTime, Schedule | fl
2. Check if the relevant timerjob has been executed successfully in the relevant timeframe
Note: You can use powershell to dump a filtered timerjob history for your web application. E.g. the following command d
variation timerjobs for the web application on port 1007:
PS> (get-spwebapplication http://servername).JobHistoryEntries | where {$_.JobDefinitionT
variation}
The following command dumps the history for the create hierarchies timer job:
3. Check if a scheduled work item for the specific type and is created in the ScheduledWorkItems
table when the relevant action is performed. See the table at the end of Part 4 to identify the
Work item to look for.
4. Check if the scheduled work item is removed from the Scheduled Work Items table after the
timerjob has been started and ended.
Warning: Direct read access to a production SharePoint database can affect the performance of the site. It is recommende
Microsoft to do this type of troubleshooting on a production system.
5.
The following event handlers need to be registered on the Pages library to ensure that the variation
system works correct:
Type : ItemDeleting
Class : Microsoft.SharePoint.Publishing.PagesListCPVEventReceiver
Type : ItemAdded
Class : Microsoft.SharePoint.Publishing.PagesListCPVEventReceiver
Type : ItemUpdated
Class : Microsoft.SharePoint.Publishing.PagesListCPVEventReceiver
Type : ItemDeleted
Class : Microsoft.SharePoint.Publishing.PagesListCPVEventReceiver
Type : ItemCheckedIn
Class : Microsoft.SharePoint.Publishing.PagesListCPVEventReceiver
Note: You can use the following powershell command to dump all event receivers registered on a specific Site:
PS> (get-spweb http://servername/en).EventReceivers | select Type,Class | fl
The following event handlers need to be registered on the site to ensure that the variation system works
correct:
Type : WebDeleting
Class : Microsoft.SharePoint.Publishing.CPVAreaEventReceiver
Type : WebMoving
Class : Microsoft.SharePoint.Publishing.CPVAreaEventReceiver
Type : WebMoved
Class : Microsoft.SharePoint.Publishing.CPVAreaEventReceiver
Be careful if you find that custom event receivers are listening to the same events as the logic in the
custom event receivers might badly interact with the event receivers registered by the variation system.
For the manual spawn/hierarchy creation actions, you usually have to rely on the information provided
by the Variation Log or ULS logs to isolate the problem. If this information is not sufficient to isolate
the issue you should consider to open a support call with Microsoft as advanced debugging skills will be
required to further isolate the problem.
The easiest way I found to troubleshoot these issues is to attach a debugger (e.g. Visual Studio) to the
worker process and monitor the status messages while loading a page with the variation labels menu.
Usually problems are reported as System.Web.HttpParseExceptions.
You might see messages like these:
(9ac.15d4): CLR exception code e0434f4d (first chance)
CLR exception type: System.Web.HttpParseException
Unknown server tag CMS:VariationsLabelEcbMenuX.
(9ac.1268): CLR exception code e0434f4d (first chance)
CLR exception type: System.Web.HttpParseException
Could not load file or assembly Microsoft.SharePoint.Publishing,
Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c or one
of its dependencies. The system cannot find the file specified.
You will have to analyze and correct the parser errors reported with the exception to fix the problem.
The variation labels menu does not show links to all existing peers
This usually indicates a problem in the relationship between the peer pages. Either site/page properties
are not correctly set or entries in the relationships list are missing or incorrect.
The best way to isolate such problems is to use STSADM -o variationsfixuptool -scan to analyze the
problems and STSADM -o variationsfixuptool -fix to solve the problem.
Note: You can use the following powershell command sequence to dump the binary content from the SPFile object of the Variatio
layout to the file system:
PS> $byteArr = ((get-spweb http://server).Lists[Master Page Gallery].Items | where{$_.Name -m
VariationRootPageLayout.aspx }).File.OpenBinary()
Possible Reasons for routing problems with the variation landing page
In general, there are five different reasons, which can cause routing problems with the Variation landing
page:
Permission problems
If the logic in the VariationsRootLanding.ascx is using security trimmed API (e.g.
Variations.Current.UserAccessibleLabels), it is possible the routine is influenced by different
permissions of the users and whether they arrive on the page anonymous or authenticated.
Test if the users can navigate to the variation top site of the desired label using the direct URL.
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:
6. Before a translator was able to work on the updated propagated page in the target another
change is done in the source and approved (version 3.0) which causes another automatic
propagation to the target (Version 1.2)
7. Another change is done on source but is not yet approved (version 3.1)
8. Now a translator starts to work on the page (version 1.2 and 1.3).
9. The translator would like to know what has changed in the source page since he last translated
the content. He uses the View Changes button which shows him the difference between version
1.0 and version 3.0 in the source page.
The question is now: how does SharePoint know which versions to compare?
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.
Translatable columns
The site settings menu contains another option which belongs to Variations which we did not yet
discuss:
Although not obvious from the name Translatable Columns are part of the Variation Infrastructure.
The purpose of translatable columns is to allow to flag which columns in publishing pages of a site
collection should be translated.
Be aware that SharePoint itself does not take care of translation! It also does not support different
languages in the same column as the option might imply.
Translatable columns are only used to flag specific columns as translatable when an export package is
created to allow an external company to translate the content.
Important: The translateable columns information is only for information to the translator. There is nothing that could prevent the
any other column beside the one marked as being translatable.
All changes to any column will be applied when importing the package back into the variation system. As well those columns mark
those which are not marked as translatable.
TranslateFields property
The information about the translatable columns is stored in Xml format the TranslateFields property in
the property bag of the root folder of the relationships list in the root site of the site collection:
<Fields>
<Field Id=52578fc3-1f01-4f4d-b016-94ccbcf428cf>Comments</Field>
<Field Id=34a72e09-3ca6-4931-b2e3-f81c40bb87bd>Description</Field>
<Field Id=f55c4d88-1f2e-4ad9-19af4ee7ee8>Page Content</Field>
</Fields>
Looking at a site in a target label in site manager in MOSS 2007 you can see the following two options:
Comparing this with the menu options of a site in a target label on SharePoint 2010 you will miss these
options:
To use the Export Variation and Import variation dialog options in SharePoint 2010 it is required to
enable these options by editing the_layouts/SiteManager.aspx file:
After changing the value of the Visible attribute to true the options are available also on SharePoint
2010.
After choosing the Export Variation option the server will export all pages in the pages library of the site
into a content migration package which is streamed back as response to the post request.
Choosing the Import Variation option redirects to a dialog that allow to pick the content migration
package holding the translated content.
Important: The dialog seems to imply that the import will be performed into the selected site but that is not what happens.The Im
with RetainObjectIdentity = true which means that the items in the package will be imported with the same Guid and Url as th
if you exported site1 and then select the import option in site2 the import will still be performed into site1. That also means that the
being imported have a different URL as before e.g. because their Url name has changed or because the site was moved.
PublishingService.ExportObjects Method
PublishingService.ImportObjects Method
ExportSettings.xml
The ExportSettings.xml file contains the information about the settings used to export the package and
the objects selected to be exported:
<?xml version=1.0 encoding=utf-8?>
<ExportSettings
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xmlns:xsd=http://www.w3.org/2001/XMLSchema
SiteUrl=http://servername/
FileLocation=C:\Temp\b3c42cb3-922a-4738-878a-bb4df62bd86b
BaseFileName=f265b29f-dbb5-4b71-93c6-3e6ed9a89add.cmp
IncludeSecurity=None IncludeVersions=CurrentVersion
ExportPublicSchema=true ExportFrontEndFileStreams=true
ExportMethod=ExportAll ExcludeDependencies=false
xmlns=urn:deployment-exportsettings-schema>
<ExportObjects>
<DeploymentObject Id=00000000-0000-0000-0000-000000000000
Type=ListItem ParentId=00000000-0000-0000-0000-000000000000
Url=/VarRoot/target/site1/Pages/default.aspx
ExcludeChildren=false IncludeDescendants=All />
</ExportObjects>
</ExportSettings>
You will find one DeploymentObject per exported page as the Translation export functionality selects
each page explicitly for export.
VariationsLanguageSettings.xml
This file only exists in content migration packages, which are created with the export for translation
option.
The file contains the information about source and desired target language to be used for the translation.
The information is taken from the configuration of the source label and the exported target label.
<LanguageSettings>
<SourceLanguage>en-US</SourceLanguage>
<TargetLanguage>de-DE</TargetLanguage>
</LanguageSettings>
TranslatableFieldSettings.xml
This file only exists in content migration packages, which are created with the export for translation
option and only if translatable columns are defined in the site collection.
The content of this file will be an exact copy of the value of the TranslateFields property in the property
bag of the root folder of the relationships list in the root site of the site collection:
<Fields>
<Field Id=52578fc3-1f01-4f4d-b016-94ccbcf428cf>Comments</Field>
<Field Id=34a72e09-3ca6-4931-b2e3-f81c40bb87bd>Description</Field>
<Field Id=f55c4d88-1f2e-4ad9-19af4ee7ee8>Page Content</Field>
</Fields>
The information in this file should be used by translators or 3rd party editing tools supporting
translators to allow them to decide which column values to translate.
Manifest.xml
This is the file which translators have to work on to translate the content. As changing the markup would
cause problems during re-import it is recommended to read the file with a custom tool which provides
access only to those columns defined in TranslatableFieldSettings.xml.
<?xml version=1.0 encoding=utf-8?>
<SPObjects xmlns=urn:deployment-manifest-schema>
<SPObject Id=04f122ee-aeb6-017f-99a7-7447d09414a1
ObjectType=SPContentType
Url=/VarRoot/target/site1/Pages>
<ContentType ID=0x010100C568DB >
<Fields>
<Field ID={f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8}
Name=PublishingPageContent StaticName=PublishingPageContent
SourceID=http://schemas.microsoft.com/sharepoint/v3
Group=Page Layout Columns DisplayName=Page Content
Type=HTML Required=FALSE Sealed=TRUE RichText=TRUE
RichTextMode=FullHtml Customization= ColName=ntext6
RowOrdinal=0 />
<SPObject Id=7bda6573-027d-4670-9ebb-c588483b9143
ObjectType=SPFile
Url=/VarRoot/target/site1/Pages/default.aspx>
<File Url=Pages/default.aspx>
<Properties>
<SPObject Id=cf8a9bfd-5892-4938-908f-ed9328e305d5
ObjectType=SPListItem
Url=/VarRoot/target/site1/Pages/default.aspx>
<ListItem FileUrl=Pages/default.aspx >
<Fields>
<Field Name=PublishingPageContent
Value=Content to be translated
FieldId=f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8 />
Identifying the relevant fields to be translated is not completely straight forward: first you have to
identify which field to translate from the TranslatableFieldSettings.xml. Here you can use the Field Id or
the field Display Name to find the Field information in the SPContentType object in the Manifest.xml
file.
This will allow you to get the Name property of the SPField which is referenced later in the SPListItem
and SPFile objects in the manifest.xml file which hold the actual content to be translated.
It is important that as well the content in the SPFile and in the SPListItem object is translated (both will
hold the same information).
Part 13 Logging
Part 14 Troubleshooting
Part 15 View Changes Button
Part 16 Translation Support
Part 17 MOSS 2007 vs. SP 2010
Part 18 FAQ
Timerjob changes
In MOSS 2007, various variation specific operations were executed in the worker process of the actual
web application rather than in a timer job. That caused a problem with large sites especially on 32-bit
systems as the memory resources available to the worker process had to be shared between the
variation operations and worker threads, which were handling web requests.
In MOSS 2007, only two operations were handled in timer jobs:
job)
As some of the remaining operations e.g. creating new variation hierarchies for an existing variation
system could run for many hours, it was possible that the configured application pool recycling
intercepted the variation operations, which led to partially propagated content between source and target.
With SharePoint 2010, the design has been changed in a way that the critical functionality has been
moved out of the worker process and into a timer job.
The following operations are affected by this design change:
UI Changes
Most of the remaining differences are a side effect of the fact that the operations are now no longer
executed as long running operations (LRO) but as timer jobs executed in a different process.
Due to this change, operations executed in the UI are now no longer executed when the user request the
operation in the UI but when the timer job runs next.
That means that UI actions, which previously started a long running operation in the worker process
have been changed to an action which only enqueues the operation for a scheduled timer job.
For a user, this change can have a significant impact on the workflow of an author as he now has to wait
for the timer job to be executed before he can work on the target items.
If the default schedule of the timer jobs is used that means, the user has to wait until the next day for the
creation of a variation hierarchy when a new label is created, and for up to one hour for each page that
needs to be variated.
Logging Changes
Variations logs are much more stable and reliable in SharePoint 2010 than in MOSS 2007. In MOSS
2007 there were many situations where variation propagation failed without helpful information in the
Variation log sometimes the entry was there but empty.
In SharePoint 2010 the variation log is much more stable and usually it is possible to pinpoint the reason
for a failed propagation through just this log.
Another change in logging are the ULS log categories used by the content deployment and migration
API.
In MOSS 2007 the Content Deployment and Migration API used mainly the Upgrade category while in
SharePoint 2010 it uses the Content Migration and Topology category.
Common Questions
Question: Are permissions replicated from source to target label?
Answer: No. Permissions are not replicated as it is expected that the same user can have a different role
in a different label.
Question: Are manually activated features replicated from source to target label?
Answer: This depends: if the features activation is done before the site has been created in the target
label through the variation engine then the features will also be activated on the target label. Features
activated on the sites later will not get replicated as the variation engine only supports updates to pages
but not to sites.
Question: Is the content of minor versions of pages replicated to the target label?
Answer: In general the answer is no. Only major versions are replicated to the target label. The only
exception is during initial replication of a site from source to target when pages are provisioned through
the site templates. During the replication the content of the current version of the related pages in the
source label is replicated to the target label even if this is a minor version.
Question: Is there a list of columns and properties which do not get overwritten during replication?
Answer: See in the note at the bottom of Part 7
Question: Are properties in the site property bag replicated from source to target?
Answer: No, site properties are not replicated.
Question: Are changes to navigation settings replicated between source and target labels?
Answer: This depends: if the navigation setting changes are done before the site has been created in the
target label through the variation engine then the navigation settings will be replicated to the target label.
Navigation changes done later will not get replicated as the variation engine only supports updates to
pages but not to sites.
https://blogs.technet.microsoft.com/stefan_gossner/2011/11/14/sharepoint-variations-thecomplete-guide-part-1-the-basics/