カスタムコンテンツタイプとページレイアウトがすべてサイト定義内にあるカスタムページライブラリがあります。SharePoint>カスタムページライブラリとPageLayout
期待どおりに動作します。私が取り組むことができないのは、ソリューションをpage-lib、ctype、stsadm経由のページレイアウトでアップグレードすると、ページレイアウト以外のすべてが更新されるということだけです。 CTYPEで
新しいフィールド - >ページ-libに問題なし 変更されたビュー - >
は、レイアウトを更新問題はない - > ERROR
ページレイアウトセクション:
<!-- specific page-layout to display LKW data -->
<File Url="CustomPage.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" >
<Property Name="Title" Value="$Resources:CustomLayouts,Title;" />
<Property Name="MasterPageDescription"
Value="$Resources:cmscore,PageLayout_BlankWebPartPage_Description;" />
<Property Name="ContentType"
Value="$Resources:cmscore,contenttype_pagelayout_name;" />
<Property Name="PublishingPreviewImage"
Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/BlankWebPartPage.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/BlankWebPartPage.png" />
<Property Name="PublishingAssociatedContentType"
Value=";#$Resources:FieldsCTypes,cTypeDisplayName;;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900D38AAFB8072F441984BC947D49503947;#" />
</File>
ONET.XMLの関連するセクション:
<Module Name="Home" Url="$Resources:cmscore,List_Pages_UrlName;Custom" Path="">
<File Url="Default.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE">
<Property Name="Title"
Value="$Resources:Layouts,DisplayName;" />
<Property Name="ContentType"
Value="$Resources:cmscore,contenttype_welcomepage_name;"/>
<Property Name="PublishingPageLayout"
Value="~SiteCollection/_catalogs/masterpage/CustomPage.aspx, $Resources:PalfingerPlatformsOrderRoot,LKWpageDefaultTitle;" />
<Property Name="PublishingPageContent"
Value="" />
</File>
</Module>
奇妙なことは、基本的なページライブラリがないページレイアウトがあれば、そのページを更新できるということです。 問題は、カスタムページライブラリ内でカスタムページレイアウトを使用する場合にのみ発生します。
私はいくつかのGoogle検索を行い、ヒントを見つけました。問題は、ページレイアウトが消されている可能性があることです。ページレイアウトがアップグレードされたコードを実行した後
SPFile file = folder.Files["Default.aspx"];
if (file.CustomizedPageStatus == SPCustomizedPageStatus.Customized)
{
file.RevertContentStream();
}
をして、新しいページレイアウトを使用しています: 私は小さなサンプルコードでこれを確認しました。
問題は、これは私には本当の解決策ではないということです。 site-defを使用して1000のサイトコレクション。とページレイアウト。 これらのすべてを更新するのはかなり苦しいです。誰かがこれに対する解決策を知っていますか?
現在のところ、私の「解決策」は、機能起動時に上記のコードを実行する機能受信機です。最終的な解決策はありませんが、今のところ回避策があります。 – Henrik