Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SharePoint > SharePoint 2007 > BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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.......
  #2 (permalink)  
Old November 14th, 2007, 06:13 PM
jminatel's Avatar
Wrox Staff
Points: 18,940, Level: 59
Points: 18,940, Level: 59 Points: 18,940, Level: 59 Points: 18,940, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,945
Thanks: 73
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:04 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.