SharePoint SiteDefinitions
Asked Answered
C

3

6

I have created a simple site definition based on the publishing portal. Every time I want to use the template to create a site-collection I get the following error-message:

The template you have chosen is invalid or cannot be found.

I do not use any custom feature, just the default features with the publishing portal site-def. Any hints?

There is a error log but it just gives me the information above:

Applying template "PalfingerPlatformsOrderRoot#0" to web at URL "http://datsa0004:8080/Platforms/Orders/0000112233".     
Failed to get the site template for language 1031, search key 'PalfingerPlatformsOrderRoot'. This warning is expected when provisioning from a custom web template.  
Failed to apply template "PalfingerPlatformsOrderRoot#0" to web at URL "http://datsa0004:8080/Platforms/Orders/0000112233".  
Failed to apply template "PalfingerPlatformsOrderRoot#0" to web at URL "http://datsa0004:8080/Platforms/Orders/0000112233", error The template you have chosen is invalid or cannot be found. 0x81071e44     
The template you have chosen is invalid or cannot be found.  
CreatePortal failed creating portal webs. Microsoft.SharePoint.SPException: The template you have chosen is invalid or cannot be found. ---> System.Runtime.InteropServices.COMException (0x81071E44): 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)     --- End of inner exception stack trace ---     at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)     at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate)     at Microsoft.ShareP...  
...oint.Publishing.PortalProvisioningProvider.CreatePortal(String xmlFile, SPWeb rootWeb)   
Carce answered 23/7, 2009 at 12:45 Comment(0)
I
8

Check your custom template's ID,(open it and view the xml) it may be conflicting with an existing template. You can check

Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\XML

for the other templates and their IDs

Iq answered 23/7, 2009 at 14:22 Comment(2)
Ah! A stupid copy-and-paste error. I've created a new site-definition based on a existing on. As MS recommends the ID was > 10000. But in fact both site definitions used the same 1000x range. To site-def. with the same ID 10001. Thank you!Carce
editors such as notepad++ can help you locate the conflicting Site Templates with the Find in Files tool - just look for ID="1000x" in all xml files under %commonprogramfiles%\Microsoft Shared\web server extensions\%SPVERSION%\TEMPLATE\%LCID%\XML (note that you might need to substitute other values: 14 and 15 for SharePoint 2010 and 2013, and another digital locale code where applicable).Nottingham
V
3

I had the same problem and it turned out it was due to a feature which got uninstalled in the server.

Such feature was included in the template file to be activated. I found this out by examining the template file (.STP) and looking at the WebFeatures node. The features there are identified by their GUIDs, so I had to search one by one in the Templates folder until I found out which one was actually uninstalled in the system.

That feature was installed in the system at the point when the template was created, then it got uninstalled. After that it was impossible to create items with the given template (and the Sharepoint error message wasn't very clear about the true reason).

After installing the feature (stsadm -o installfeature...) everything started working.

Variety answered 27/5, 2010 at 8:13 Comment(0)
B
1

Check the trace logs/ULS logs in the 12 hive - there's almost certainly more information on your error in there.

Baculiform answered 23/7, 2009 at 13:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.