Share via


Page variation update doesn´t work after SharePoint 2013 migration (upgrade)

Hi! After some testing I discovered something quite funny while upgrading a publishing site collection from SharePoint 2010 to SharePoint 2013 with Variations. The original configuration in 2010 was that is updates pages across label targets. This means, if you change or add a new page, it will update all the pages in their corresponding labels.

My scenario:

I have a publishing site collection in SharePoint 2010 with three labels: English and another two languages. Let's say that the English is the source label. After you update an existing page in the root label, after the execution of the job, it will update all the target labels. This is the same if you create a new page.

Migration process

The migration was done by using the Test-SPContentDatabase and Mount-SPContentDatabase explained in the following TechNet article:

https://technet.microsoft.com/en-us/library/cc263299.aspx

Unexpected behavior

If you update any page in the root label, it won't be reflected in any target, but the variation log reflects that the job actually started the update process! What happened?

Explanation

After some testing, I fully upgraded the site collection to SharePoint 2013 "Experience" using the following procedure.

https://technet.microsoft.com/en-us/library/jj219474.aspx

And noticed that the variations label settings page has totally changed from this:

to this:

Problem is that you can't change the values shown in the SharePoint 2013 page in "2010 mode".

Solution

I have prepared a little script so you can change it without the need to fully upgrade to SharePoint 2013 mode and give you some oxygen until you fully upgrade it!

$url = https://mysite.midomain.com

#
#Get the site collection
$rootsite = Get-SPSite $url

#
#Get the GUID of the variation label list
$guidlista = New-Object Guid($rootsite.RootWeb.AllProperties["_VarLabelsListId"])

#
#Get the list with the variation labels itself
$variationlabelsList = $rootsite.RootWeb.Lists[$guidlista]

#
#Retrieves all the label except the source one
$etiquetasdestino = $variationlabelsList.Items | ? {!$_["Is_x0020_Source"]}

#
#For each target label
$etiquetasdestino | % {

Write-Host "Updating label $($_.Title)"
$_["NotificationMode"] = $false
$_.Update()

}

 Enjoy!!