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

I lost 3 hours of my life to a stupid collision of template ID’s. Creating a site collection or child web based on one of my custom templates kept failing with the following UI error message

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

The SharePoint logs were less than helpful:

02/15/2009 14:32:22.97     output.exe (0x10CC)                         0x1E14    Windows SharePoint Services       General                           72k2    High        Failed to apply template "xxxxxx#0" to web at URL http://xxxxxx/sites/test2, error The template you have chosen is invalid or cannot be found. 0x81071e44    

02/15/2009 14:32:22.97     output.exe (0x10CC)                         0x1E14    Windows SharePoint Services       General                           8kh7    High        The template you have chosen is invalid or cannot be found.  

Solution:

Make sure all of the site definition configurations located in %programfiles%\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\1033\XML have a unique IDs. Microsoft suggests ID values above 10000 to avoid conflicts with future Microsoft supplied site definitions (http://msdn.microsoft.com/en-us/library/ms441616.aspx). Most custom site definitions therefore use 10001 and if two site definitions have the same ID you wind up wasting several hours trying to figure out why it’s not provisioning your site definition.

Tagged

6 thoughts on “The template you have chosen is invalid or cannot be found.

  1. Tripti's avatar Tripti says:

    Thanks a lot for the solution

  2. philo's avatar philo says:

    Thank you, thank you, thank you for this 🙂

  3. Henrik's avatar Henrik says:

    Yeah – you saved my day!

  4. Suganya Nataraj's avatar Suganya Nataraj says:

    Hi,
    Even i am facing the same error,can anyone help me out.

    I have saved my site as a template in source site and uploaded it into the destination site. But when I go to create a site in the destination site using the uploaded site template, I get the error:the template you have choosen is invalid or cannot be found.Moreover i am not using any customized templates. Any help is appreciated

  5. rasor's avatar rasor says:

    Oh – no – I did it again. Thanks for the post.

  6. Team Site's avatar Team Site says:

    Thanks dude. you saved us a day…

Leave a reply to rasor Cancel reply

Design a site like this with WordPress.com
Get started