I created a custom content type and a page layout for it. Publishing Feature
is activated on my site collection. Now, I can flawlessly create some pages out of this content type in the Pages Library
.
Now, I want to create a document library with my custom content type as default type, but when I want to create a page, I get :
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.SharePoint.Utilities.SPUtility.CreateParentFoldersForFile(SPList list, String url, Boolean createAsListItem)
at Microsoft.SharePoint.Publishing.Internal.CodeBehind.CreatePagePage.NewPageItemSave(String pageName, PageLayout pageLayout, String folderUrl, Boolean redirect)
at Microsoft.SharePoint.Publishing.Internal.CodeBehind.CreatePagePage.CreateStandardPage(String pageName)
at Microsoft.SharePoint.Publishing.Internal.CodeBehind.CreatePagePage.ButtonCreatePage_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint...