2011-01-13 90 views
3

SharePoint 2010 我有一個企業維基站點,我從一個服務器場導出並導入到另一個服務器場。但是,我將其從網站集根網站導出到其他網站集中的子網站。當我瀏覽到使用Enterprise wiki模板創建的任何頁面時,出現錯誤:SharePoint 2010:此頁面未使用有效的頁面佈局

此頁面未使用有效的頁面佈局。 「

頁面佈局顯示爲基本頁面,並且對於新建頁面可以正常工作如何修復頁面佈局,即現有的頁面佈局網頁?

有什麼想法?

+0

你試過重置網站定義 – 2011-01-13 07:28:24

回答

1

原來這是一個錯誤。如果導入發佈網站,網頁沒有正確鏈接到頁面佈局。沒辦法通過用戶界面來解決這個問題。我有使用PowerShell

0

我跟着Mahesh's Blog到這個MS Support article並且使用Manag e內容和結構工具來更改頁面佈局。很奇怪(這個錯誤似乎是從無法從SharePoint 2007升級的頁面出現下游錯誤,並且有一個XsltListViewWebPart,它具有無效的GroupBy設置)。

0

下面是在的情況下複製的鏈接的代碼更簡單/類似版本的原始消失(我已經增加了大約什麼需要改變的筆記)

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") 
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Publishing") 

$web = Get-SPWeb -Identity "http://web/you/are/modifying"; #Change web that you're modifying on this line 

$spPubWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web); 
$pages = $spPubWeb.PagesList; 

foreach($item in $pages.Items) 
{ 
    $pubPage = [Microsoft.SharePoint.Publishing.PublishingPage]::GetPublishingPage($item) 

    $url = new-object Microsoft.SharePoint.SPFieldUrlValue($pubPage.ListItem[[Microsoft.SharePoint.Publishing.FieldId]::PageLayout].ToString()) 

    if($url -ne $null) 
    { 
    if($url.Url -match 'NameOfPageLayout') #Change Page layout name on this line 
     { 
     $newurl = new-object Microsoft.SharePoint.SPFieldUrlValue("http://new/rootweb/_catalogs/masterpage/NewPageLayout.aspx, NewPageLayoutName") #Change URL and name on this line 
     $pubPage.Name 
     $pubPage.CheckOut() 
     $pubPage.ListItem[[Microsoft.SharePoint.Publishing.FieldId]::PageLayout] = $newurl 
     $pubPage.ListItem.UpdateOverwriteVersion() 

     $pubPage.ListItem.File.CheckIn("Fixed URL to page layout.", [Microsoft.SharePoint.SPCheckinType]::MajorCheckIn); 
     } 
    } 

} 
相關問題