Variations: Propagate Pages on Your Terms

Hi everyone,

I'd like to answer a common question about how to modify the behavior the Variations feature in SharePoint 2010 uses when propagating pages. That is, how pages in the source variation site are copied and appear on target variation sites as minor draft versions.

Page propagation is triggered by publishing a page on the source variation site by default. Each time you publish a source page, the Variations Event Receiver adds a work item to the Variations Propagate Pages timer job queue. When the timer job runs, it will begin executing the first 100 page propagation work items. For each work item, Variations will copy the source page to all target sites, creating the page if it does not yet exist, or appending a draft minor version if the target page does already exist.

In some cases, users might not want changes to a page on the source to necessarily propagate to all targets. That is, users might want to make source-local changes and have the option to make changes globally applicable when they want. This often takes the form of a question like "How can I stop variations from overwriting my target pages every time I publish a source page?" Variations in SharePoint 2010 helps you do this.

In SharePoint 2010, we've worked to improve the Variations feature's server citizenship by moving all Variations operations to the timer service. This way, server administrators can control the frequency with which operations run and better manage server load. The "Update Variations" button now adds a work item to the same Variations Propagate Page timer job queue as does publishing a page when "Automatic Creation" is enabled. What differentiates "Update Variations" is that you can also use this button to propagate source draft versions without publishing them on the source variation site.

When you run this PowerShell script to enable "On-Demand Page Propagation," all Variations Propagate Pages timer job work items are filtered and discarded except those added to the queue by the Update Variations button:

Enable On-Demand Page Propagation:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$site = new-object Microsoft.SharePoint.SPSite("https://yourserver/sites/abc")
$folder = $site.RootWeb.Lists["Relationships List"].RootFolder
$folder.Properties.Add("DisableAutomaticPropagation", "True")
$folder.Update();

Disable On-Demand Page Propagation:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$site = new-object Microsoft.SharePoint.SPSite("https://yourserver/sites/abc")
$folder = $site.RootWeb.Lists["Relationships List"].RootFolder
$folder.Properties.Remove("DisableAutomaticPropagation")
$folder.Update();

clip_image001

"Update Variations" in SharePoint 2010 can be used to propagate the current version of a page on-demand provided that the Variations Propagate Page Timer Job is enabled

In MOSS 2007, some users disabled the "Variations Propagate Pages" timer job in Central Admin as a workaround. With the timer job disabled, publishing a source page would not cause SharePoint to copy the source page to any target page. Authors on the source variation site could then use the "Update Variations" button to propagate the current version of the source page on-demand.

Clicking "Update Variations" in MOSS 2007 immediately propagated the current version of the source page to all target pages, "skipping the line" and bypassing the Variations Propagate Pages timer job. So when the timer job was disabled, "Update Variations" could still be used to propagate pages.

However, when the timer job is disabled, publishing pages on the source continues to add work items to the timer job queue if the "Automatic Creation" option is enabled, as it is by default. Over time, the queue can grow and contain hundreds or thousands of work items, all of which would begin to execute if the Variations timer job were re-enabled in the future. If you upgrade to SharePoint 2010 with a backlog of work items, SharePoint will discard these.

With the new “On-Demand Page Propagation” functionality, you can achieve this content distribution model out of the box.

clip_image002

"Update Variations" in MOSS 2007 works differently under the hood from its counterpart in SharePoint 2010

Things to keep in mind:

  • “On-Demand Page Propagation” affects the entire site collection; that is, if you enable this setting, no source page will be copied to any target page when the source page is published. Only the "Update Variations" button will cause pages to propagate when the timer job is enabled.
  • Source pages will be copied as draft minor versions to all target variation sites when you use the "Update Variations" button.

Thanks for reading. Happy propagating!

Josh Stickler
Program Manager