Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9
This is the forum to discuss the Wrox book Professional SharePoint 2007 Development by John Holliday, John Alexander, Jeff Julian, Eli Robillard, Brendon Schwartz, Matt Ranlett, J. Dan Attis, Adam Buenz, Tom Rizzo; ISBN: 9780470117569
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 8th, 2007, 11:05 AM
Registered User
 
Join Date: Oct 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default The template you have chosen is invalid or cannot

I was receiving the following message when trying to create a new Site Definition by following the steps in Chapter 4 of the SharePoint 2007 Development book.

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

I learned that you need to be very careful to avoid conflicts with IDs already used in Windows SharePoint Services. It is suggested to use UNIQUE values greater than 10,000 for the ID attribute. Also the template ID must be unique from the ID's used in all the webtemp.xml files, i.e. don't have two that specify ID="10001".

In my case my XML looked like this:

<?xml version="1.0" encoding="utf-8"?>
<Templates xmlns:ows="Microsoft SharePoint">
<Template Name="SAMPLE" ID="10001">
<Configuration ID="0" Title="Sample Site" Hidden="FALSE" ImageUrl="/_layouts/images/stsprev.png" Description="Blah blah blah." DisplayCategory="Custom Site Definitions" > </Configuration>
</Template>
</Templates>

By changing the ID to 10004 the problem went away. I didn't realize, or had forgotten, that I had used the ID of 10001 previously for another template. My correct XML was:

<?xml version="1.0" encoding="utf-8"?>
<Templates xmlns:ows="Microsoft SharePoint">
<Template Name="SAMPLE" ID="10004">
<Configuration ID="0" Title="Sample Site" Hidden="FALSE" ImageUrl="/_layouts/images/stsprev.png" Description="Blah blah blah." DisplayCategory="Custom Site Definitions" > </Configuration>
</Template>
</Templates>

The next template I create will have an ID of 10005, the one after that 10006, etc.......
 
Old November 14th, 2007, 06:13 PM
jminatel's Avatar
Wrox Staff
Points: 17,906, Level: 58
Points: 17,906, Level: 58 Points: 17,906, Level: 58 Points: 17,906, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
Default

Hi, I moved this into the book forum instead of the general SharePoint Dev forum to give the authors a better chance of seeing it and responding.

Jim Minatel
Acquisitions Director
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Wrox online library: http://wrox.books24x7.com




Similar Threads
Thread Thread Starter Forum Replies Last Post
Invalid Characters dnayak XSLT 1 April 19th, 2008 02:22 AM
get the printer name chosen in print dialog deep_ocean Classic ASP Basics 0 March 14th, 2007 10:27 AM
calling one template in other template VijayKumar XSLT 3 September 15th, 2005 11:12 AM
Invalid use of Null LT2003 All Other Wrox Books 3 December 1st, 2003 04:02 PM
Display images according to radio button chosen godhsf80 PHP How-To 8 December 1st, 2003 12:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.