Link to home
Start Free TrialLog in
Avatar of MercyHousing
MercyHousing

asked on

Error Importing Site Using STSADM - Could Not Find WebTemplate

I am trying to make a copy of one of my SharePoint sites in the same location as the current site. I used the STSADM export command to create the .cab file. Then I created an empty website where I want the copy to go, as described here. But when I try to run the import command in STSADM, I get this error:  Could not find WebTemplate #10003 with LCID 1033.

I know this happens when people try to move a site to a different server that doesn't have the same site templates installed, but in this case I am trying to move it to the exact same level as the original site on the same server. I don't know which template it is complaining about, and the templates should all be the same since it's the same location. Any ideas?
Avatar of quihong
quihong
Flag of United States of America image

When you do a stsadm export/import, you first need to create the site using the same site template as the original site.

Do you know what site template you used?
Avatar of MercyHousing
MercyHousing

ASKER

Are you talking about the site template for the top level of the site I exported? I don't know which template it uses. Is there a way to find out? According to the link I included in my original post, and several other things I've read, the new site needs to be empty, without a template applied, in order for the import to work. But you are saying I have to apply the template first?
Let me make sure I understand what you are trying to do first.

You have a subsite which you want to duplicate right?

http://server/sites/toplevelsite -> top level site collection
http://server/sites/toplevelsite/siteA -> site you want to copy
http://server/sites/toplevelsite/siteB -> destination site

The site template used for SiteB needs to match the site template used for SiteA.

To answer your question, not the top level site template. I'm not sure able creating the site first without a template, but I've always created the site first using the GUI and selecting the appropriate site template (typically a Team Site).

Also, can I get some screenshots of what you are doing and the error message itself.
Yes, that is what I want to do. I was just wondering about the templates that are in use on the subsites below SiteA, because they are different than the one used on SiteA itself. So how do I figure out which template was used on SiteA?

I don't have screenshots but here are the commands I used:

Export:  

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe -o export -url http://myserver/level1/mysite -filename D:\itsite.cab -includeusersecurity -versions 4 -nofilecompression

Import:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe -o import -url http://myserver/level1/mysite2 -filename D:\itsite.cab -includeusersecurity -nofilecompression

And here is the error message it gave when I ran the import command:

Could not find WebTemplate #10003 with LCID 1033.
OK, I figured out that the site was using the Team Site template. So I set up the empty site with that template and tried the import again. The same error occurred. Here is the log:

[9/29/2010 12:34:16 PM]: Start Time: 9/29/2010 12:34:16 PM.
[9/29/2010 12:34:16 PM]: Progress: Initializing Import.
[9/29/2010 12:34:22 PM]: FatalError: Could not find WebTemplate #10003 with LCID 1033.
   at Microsoft.SharePoint.Deployment.ImportRequirementsManager.VerifyWebTemplate(SPRequirementObject reqObj)
   at Microsoft.SharePoint.Deployment.ImportRequirementsManager.Validate(SPRequirementObject reqObj)
   at Microsoft.SharePoint.Deployment.ImportRequirementsManager.DeserializeAndValidate()
   at Microsoft.SharePoint.Deployment.SPImport.VerifyRequirements()
   at Microsoft.SharePoint.Deployment.SPImport.Run()
[9/29/2010 12:34:22 PM]: Progress: Import Completed.
[9/29/2010 12:34:22 PM]: Finish Time: 9/29/2010 12:34:22 PM.
[9/29/2010 12:34:22 PM]: Completed with 0 warnings.
[9/29/2010 12:34:22 PM]: Completed with 1 errors.
Looks like you made some customization to the Site Def. Did you?
ASKER CERTIFIED SOLUTION
Avatar of quihong
quihong
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think I just found it. I figured out which template #10003 is - it's a customized site template that a consultant created a long time ago. It is being used on one of the subsites, but we don't need it. I will try deleting that subsite and then re-export the site and see if it works. By the way - the thing that helped the most was a query from a link off of one of the links you sent me, showing how to query the database to find the template ID:

SELECT Title, WebTemplate,ProvisionConfig
FROM dbo.Webs
WHERE Title={title of your site}

I turned that around and did the same query WHERE WebTemplate = 10003 and found all of the sites that are using that template.

It was in the comments on this page:
http://blog.rafelo.com/2008/05/determining-site-template-used-on.html

I'll let you know if it works this time. Thanks!
Yes, it worked. Thanks for all your help!