0

I've imported a site collection via PowerShell and all the pages show the message:

The current page has been customized from its template. [Revert to template].

The original site collection didn't have any modifications to the master page. Why does the import display this?

2 Answers 2

1

I think it is still interpreted as different master page. I would also like to know some 'real' solution for this but so far I only know workaround on how to get rid of this message:

SharePoint 2010: The current page has been customized from its template. Revert to template.

I have implemented this only once before after masterpage customization.

1
  • Thanks, Vedran. What puzzles me is why this happens when we do an export of an entire site collection. Like you said, it thinks it's a different master page.
    – Alex C
    Sep 18, 2011 at 18:29
2

Right, it is still interpreted as different master page.

I ran following script:

$web = Get-SPWeb <your intranet site URL>

$list = $web.Lists["Wiki"]

$spQuery = New-Object Microsoft.SharePoint.SPQuery

$spQuery.ViewAttributes = "Scope='Recursive'";

$spQuery.RowLimit = 2000

$caml = '<OrderBy Override="TRUE"><FieldRef Name="ID"/></OrderBy>'

$spQuery.Query = $caml 

do
{
    $listItems = $list.GetItems($spQuery)

    $spQuery.ListItemCollectionPosition = $listItems.ListItemCollectionPosition

    foreach($item in $listItems)
    {
        $DebugPreferences = "Continue"

        Write-host "Resetting wiki page in site."

        $item.File.RevertContentStream()
    }
}
while ($spQuery.ListItemCollectionPosition -ne $null)

$web.Dispose()

References: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfile.revertcontentstream(v=office.14).aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.