Skip to content
August 16, 2012 / red1s

SharePoint 2010 Missing Site Definition Error


During an upgrade process I came across the following error which seemed to have halt the upgrade process and disallowed the overall content of the site to be migrated across:

Category : MissingSiteDefinition

Error : True

This was encountered after running a test-spcontentdatasbe command against an exported content database

PS C:\Users\$HP_IDPDEVAPP_SVC> Test-SPContentDatabase -Name FARM_ZA_<CONTENT DB>

_CONTENT_DB -WebApplication .local">http://<site2010>.local

Category : MissingSiteDefinition

Error : True

UpgradeBlocking : False

Message : 1 Sites in database [FARM_ZA_<CONTENT DB>] has ref

erence(s) to a missing site definition, Id = [9003], Lcid = [

1033].

Remedy : The site definitions with Id 9003 is referenced in the databa

se [FARM_ZA_ANGLODOC_KIO_CONTENT_DB], but is not installed on

the current farm. The missing site definition may cause upgr

ade to fail. Please install any solution which contains the s

ite definition and restart upgrade if necessary.

I then investigate by running the following command against the webs table in the relevant database:

select fullurl from webs where webtemplate = ‘9003’

It turns out that this entry existed for the main site.

I checked the xml folder based on the info in the following link : http://msdn.microsoft.com/en-US/library/aa543837.aspx

Which instructs you to copy / duplicate the files (site templates) from the 12 hive into the equivalent 14 hive folder

However upon further investigation this site template wasn’t found.

The next step based on these articles would have been to delete the sites in question – however due to this being a root site this would not be possible:

Note the following is unsupported by MS:

I then decided to rename the site template with a template id I knew was there (being 9000) in this case i

I retested the content database ….and Voila! …the site definition error had disappeared.

Upon mounting the database the site upgraded successfully and was fully accessible.

Upon updating the masterpage all was in order and the site was successfully upgraded!

Reference sites

http://justgeeks.blogspot.com/2012/06/resolving-missing-references-when.html>

http://sharepoint-sandbox.com/index.php?/Tips-and-Tricks/Development/tip-41-how-to-find-the-site-definition-being-used-for-a-site.htMl

http://msdn.microsoft.com/en-US/library/aa543837.aspx

http://support.microsoft.com/kb/954761

http://blog.blumenthalit.com/default.aspx

http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/5dc3b69b-e8f5-4cec-be64-17f64b84c6a3/

Leave a comment