SharePoint > Custom Page-Library & PageLayout <p>I have a custom page-library which a custom content-type and a page-layout all inside a site-definition. </p> <p>Works as expected. The only thing I cannot get around is that if I upgrade the solution with the page-lib, ctype, page-layout via stsadm everything is updated except the page-layout.</p> <p>New fields in the ctype --> no problem Changed views in the page-lib --> no problem</p> <p>Updated PageLayout --> ERROR</p> <p>The page-layout section:</p> <pre><code>&lt;!-- specific page-layout to display LKW data --&gt; &lt;File Url="CustomPage.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" &gt; &lt;Property Name="Title" Value="$Resources:CustomLayouts,Title;" /&gt; &lt;Property Name="MasterPageDescription" Value="$Resources:cmscore,PageLayout_BlankWebPartPage_Description;" /&gt; &lt;Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" /&gt; &lt;Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/BlankWebPartPage.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/BlankWebPartPage.png" /&gt; &lt;Property Name="PublishingAssociatedContentType" Value=";#$Resources:FieldsCTypes,cTypeDisplayName;;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900D38AAFB8072F441984BC947D49503947;#" /&gt; &lt;/File&gt; </code></pre> <p>The relevant section in the onet.xml:</p> <pre><code>&lt;Module Name="Home" Url="$Resources:cmscore,List_Pages_UrlName;Custom" Path=""&gt; &lt;File Url="Default.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE"&gt; &lt;Property Name="Title" Value="$Resources:Layouts,DisplayName;" /&gt; &lt;Property Name="ContentType" Value="$Resources:cmscore,contenttype_welcomepage_name;"/&gt; &lt;Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/CustomPage.aspx, $Resources:PalfingerPlatformsOrderRoot,LKWpageDefaultTitle;" /&gt; &lt;Property Name="PublishingPageContent" Value="" /&gt; &lt;/File&gt; &lt;/Module&gt; </code></pre> <p>The strange thing is, if I just have a page-layout with no underlying page-library I can update the page-ayout. The problem only occurs if I use a custom page-layout inside a custom page-library.</p> <p>I did some Google search and found a hint - the problem could be that the page-layout is unghosted. I checked this with a small sample code:</p> <pre><code>SPFile file = folder.Files["Default.aspx"]; if (file.CustomizedPageStatus == SPCustomizedPageStatus.Customized) { file.RevertContentStream(); } </code></pre> <p>After executing the code the Page-Layout is upgraded and uses the new page-layout.</p> <p>The Problem is that this is no real solution for me because I have approx. 1000 site-collections using the site-def. and the page-layout. Updating all of them is quite painful. Does anybody know a solution for this?</p>