Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've made a custom web template based on BLANKINTERNET that has a specified DefaultPageLayout and a set of available page layouts, these are set in the Publishing Feature. I upload the solution and install it thru PowerShell and then I go to New site thru Site Actions. I can choose my template and a name for the new site but when I create it I just get a 404. I can however reach the settings of my newly created site thru Manage Content and Structure and there I see that the page layouts are there so that works. Does anyone have an idea why I get a 404? I have put a default.aspx file in the same folder as ONET.xml and Elements.xml but I have had no luck so far.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Did u create a Module to provision the default.aspx page? This element can not be in the ONET.xml so you'll have to create a Feature for this to provision the actual page.

U can read this post on how to implement Web Templates the right way. It is the best information available in my opinion:

SharePoint 2010 and Web Templates

share|improve this answer
    
No, I haven't added a module, thx for the tip. Do you know of any other way to solve this without having to add a module? What if I removed the default.aspx file all together? –  K.W Dec 23 '11 at 11:33
    
For a site there needs to be a default.aspx. However with a WebTemplate you can create one without having an actual aspx file. Using a module like this: <Module Name="MyDefaultPage" Url="$Resources:osrvcore,List_Pages_UrlName;" SetupPath="SiteTemplates\SPS"> Now a copy from the default.aspx that is stored in the SiteTemplates\SPS is being provisioned, and you don't need an aspx file in your solution. –  Cas van Iersel Dec 27 '11 at 10:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.