walka

I deployed a page layout via a feature to the Site Col. and I now receive this error upon trying to create a new page.

"There are no page layout files available in the master page library of the top-level site. Add one or more page layouts to this library before you create a page or set page properties"

I verified that the feature is activated and the page layout (and the OOTB page layouts) are in the master page gallary.

Has anyone seen this error I assume that there is a problem with my page layout. But this error is fairly generic.

Thanks



Re: SharePoint - Development and Programming "There are no page layout files available in the master page library of the top-level site..."

Gary Lapointe

I'm not sure if this will solve your problems or not but I've got a custom command that created which may help: http://stsadm.blogspot.com/2007/09/convert-sub-site-to-site-collection.html (repairsitecollectionimportedfromsubsite).

The command was specifically created to address problems discovered when converting a sub-site to a site collection but the bulk of the issues are the result of page layouts getting screwed up. If the command itself doesn't help then take a look at the code and corresponding comments - they should help you in further troubleshooting the problem. At a minimum the repair command should be able to restore the OOB layouts.

Good luck!

Gary





Re: SharePoint - Development and Programming "There are no page layout files available in the master page library of the top-level site..."

walka

Thanks for the reply. I didn't get a chance to try your post, but you helped me isolate the problem to the page layout.

I redeployed the feature with new guids and got a different error when trying to create a page. ("index out of range") I looked at the page layout settings and the content type property is "Value#". I assume that there is something wrong in my declaration of the page layout when provisioning the file as a module in the feature. I think I have the right combination of GUIDs and Content type ids, but I wouln't be suprised if I got it wrong based on the wackyness of how you define a page layout's CT in the module.

For the life of me I can't deploy a page layout based on a custom content type via a feature! Does anyone have a good link/example

Here's what I want to do

install custom content type (i know how do do this) and a page layout based on that content type (dont know how do do this) via a Feature.

Thanks everyone.