I was asked today to disable the automatic propagation of variation pages for one of our site collections. Immediately I checked the Technet article for this.
According to the Technet article I needed to execute the following Powershell scripts:
$site = Get-SPSite "<VariationURL>"
$folder = $site.RootWeb.Lists["Relationships List"].RootFolder
$folder.Properties.Add("DisableAutomaticPropagation", $true)
$folder.Update()
$site.Close()
Unfortunately it didn’t work. for some reason the $folder variable was null
error message was:
You cannot call a method on a null-valued expression.
At line:1 char:23
+ $folder.Properties.Add <<<< ("DisableAutomaticPropagation", $true)
+ CategoryInfo : InvalidOperation: (Add:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
after a little bit of looking around in powershell I did come up with a workaround by loading the Relationships list in a separate variable, changing the script as follows:
$site = Get-SPSite "<VariationURL>"
$list = $site.RootWeb.GetList("Relationships List")
$folder = $list.RootFolder
$folder.Properties.Add("DisableAutomaticPropagation", $true)
$folder.Update()
$site.Close()
Hope this helps someone out


