开发者

MOSS: Creating site templates from publishing sites

On my MOSS site I am trying to save a publishing site as a site template. Then create subsites from this template.

I am able to sucessfully create the site template and it is populated in the site template gallery. Following these instructions.. http://blah.winsmarts.com/2007-7-All_you_ever_wanted_to_know_about_SharePoint_2007_Site_Templates.aspx

But when I try and create a subsite from this template, an error message is displayed stating:

The template you have chosen is invalid or cannot be found.   at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, 开发者_开发百科String& bstrWebTemplate, Int32& plWebTemplateId)
   at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)

When I save the site template as a .stp file then rename to a .cab and extract and view the manifest.xml, I see that the TemplateID = 39. Is this conflicting with the the CMSPublishing template which has the same ID?

If so how do I change the ID and repackage the cab file?

--Edit-- I tried changing the ID from 39 to a 327 and repacking the cab and uploading though the site template does appear as an option when creating subsites.... So it does not matter if multiple templates have the same templateID.

Many Thanks, Nav


After looking at the sharepoint diagnostic logs i found that features were being applied from the template that were failing.

Comparing web features to the list of sharepoint listed web and site features i deleted the ones not in the list in particular those features which were failing to be applied from the logs.

Rebuilt the cab file outputted to stp file using the cabarc N command below: http://billwg.blogspot.com/2009/04/how-to-modify-project-portal-site.html

Then the publishing template was successfully applied, notice you will have to turn the publishing feature back on once the site is created.

Below is an extract of the webfeatures taken from the manifest.xml from the stp after extracting to a cab file

<WebFeatures>
<Feature ID="e8734bb6-be8e-48a1-b036-5a40ff0b8a81"/>
<Feature ID="56dd7fe7-a155-4283-b5e6-6147560601ee"/>
<Feature ID="0be49fe9-9bc9-409d-abf9-702753bd878d"/>
<Feature ID="99fe402e-89a0-45aa-9163-85342e865dc8"/>
<Feature ID="541f5f57-c847-4e16-b59a-b31e90e6f9ea">
<Properties>
<Property Key="InheritGlobalNavigation" Value="true"/>
<Property Key="ShowSiblings" Value="true"/>
<Property Key="IncludeSubSites" Value="true"/>
</Properties>
</Feature>
</WebFeatures>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜