Microsoft Knowledge Base Email Alertz

(925189) - Describes an issue in whihc you receive an error message when you use an existing site template to create another SharePoint site in Microsoft SharePoint Server 2007.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 925189 - Last Review: June 17, 2008 - Revision: 3.0

Error message when you try to use an existing site template to create a new SharePoint Server 2007 site: "Failed to apply template"

SYMPTOMS

Consider the following scenario. You change an existing Microsoft Office SharePoint Server 2007 site. You save the updated SharePoint Server 2007 site as a template. Then, you try to use this template to create a new SharePoint Server 2007 site.

In this scenario, when you click Save Site as Template under Look and Feel on the Site Settings page, you receive the following error message:
Failed to apply template TemplateName.stp to web at URL SharePointSiteName, error The template you have chosen is invalid or cannot be found.
Additionally, the template is not saved.

CAUSE

This issue occurs if the top-level SharePoint Server 2007 site of the SharePoint Server 2007 site that you are trying to save as a template has the publishing features turned on. In this case, Save Site as Template appears under Look and Feel on the Site Settings page.

Note To prevent the use of the Save site as template feature for creating new sites, you must disable the Save site as template feature. However, if the top-level site has the publishing features turned on, the option to turn off the Save site as template feature is disabled when you try to create a new site. This behavior also occurs in SharePoint designer.

The supported method to create templates for publishing sites is to use site definition templates. For more information, visit the following Microsoft Web site:
http://msdn.microsoft.com/en-us/library/ms434313.aspx (http://msdn.microsoft.com/en-us/library/ms434313.aspx)

WORKAROUND

To work around this issue, open the Feature.xml file of the Publishing feature. Then, manually add a new ElementManifest. For example, add the following element.
<ElementManifest Location="MyHideAction.xml"/>
Then, create a new MyHideAction.xml file in the same directory by using the following content.
<Elements xmlns="http://schemas.microsoft.com/sharepoint">
<HideCustomAction Id="HideSaveAsTemplate" HideActionId="SaveAsTemplate" 
GroupId="Customization" Location="Microsoft.SharePoint.SiteSettings" /> 
</Elements>

REFERENCES

For more information about the Feature.xml file, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/library/ms475601.aspx (http://msdn2.microsoft.com/en-us/library/ms475601.aspx)

APPLIES TO
  • Microsoft Office SharePoint Server 2007
Keywords: 
kbtshoot kbprb kbexpertiseinter KB925189
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate