Wednesday, July 4, 2012

Site template not found in sharepoint 2010



Hello,
When we are creating site using custom template using webtemp.xml file you will get the error like
Site template not found.
This is because of the same template id in the different webtemp.xml file under the specified culture folder.


e.g. for english "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML"




<?xml version="1.0" encoding="utf-8"?>
<Templates xmlns:ows="Microsoft SharePoint">
<!--Provision for Global site-->
<Template Name="SharepointCustomGlobal" ID="10051">
<Configuration ID="0" Title="SharepointCustom content management host site"
Hidden="FALSE" ImageUrl="/_layouts/1033/images/IPPT.gif"
Description="A SharepointCustom site."
ProvisionAssembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
ProvisionClass="Microsoft.SharePoint.Publishing.PortalProvisioningProvider"
ProvisionData="xml\\SharepointCustomGlobalPortal.xml"
RootWebOnly="TRUE" DisplayCategory="SharepointCustom" VisibilityFeatureDependency="97A2485F-EF4B-401f-9167-FA4FE177C6F6">
</Configuration>
</Template>
</Templates>


So to resolve this error you need to change the Template ID of your existing webtemp.xml file
So  suppose previously it was like 10051 so change it some what else not used by any one like 20050 something..
so modified webtemp.xml with new id id like


<?xml version="1.0" encoding="utf-8"?>
<Templates xmlns:ows="Microsoft SharePoint">
<!--Provision for Global site-->
<Template Name="SharepointCustomGlobal" ID="10051">
<Configuration ID="0" Title="SharepointCustom content management host site"
Hidden="FALSE" ImageUrl="/_layouts/1033/images/IPPT.gif"
Description="A SharepointCustom site."
ProvisionAssembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
ProvisionClass="Microsoft.SharePoint.Publishing.PortalProvisioningProvider"
ProvisionData="xml\\SharepointCustomGlobalPortal.xml"
RootWebOnly="TRUE" DisplayCategory="SharepointCustom" VisibilityFeatureDependency="97A2485F-EF4B-401f-9167-FA4FE177C6F6">
</Configuration>
</Template>
</Templates>


Regards
Hiren Patel

No comments:

Post a Comment