Problem
Performed test-SPContentDatabase on a SharePoint 2010 content database restored to the backend of a SharePoint 2013 farm. These efforts were part of an overall upgrade process from SharePoint 2010 to SharePoint 2016. Discovered the following error in the resultant report:
13 Sites in database [content database name] have reference(s) to a missing site definition, Id = [6215], Lcid = [1033], compatibility level = [14].
The MissingSiteDefinition error was non-upgradeblocking, so, proceeded with mounting this 2010 content database to 2013 web application and upgrading it. Upgrade completed successfully but with errors, one of which was the MissingSiteDefinition error. Then launched a site health check TEST and the Site Collection Health Check Results report page listed 13 instances of Missing Site Template issues that had to be fixed or site upgrade would fail. Interestingly, in the Site Collection Health Checks Results report, these 13 instances do not contain the actual name of the template that is missing, only something like " - #0". Began troubleshooting.
Troubleshooting
- On SharePoint 2010 farm, executed the following in an elevated DOS shell:
CD C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\
echo ^ > "D:\report.xml"
stsadm -o enumallwebs -databasename "[content database name]" -includefeatures -includewebparts -includeeventreceivers -includesetupfiles -includecustomlistview >> "D:\temp\report.xml" - Opened file in browser, and searched for "6215". Found 13 instances. Each instance was similar to the following:
-<Web Id="[web id]" TemplateId="6215" TemplateName="PWS#0" LanguageId="1033" Url="/[web url]">
Note in particular the template name and ID: PWS#0. - For one of the webs identified above, checked its source, searching for the g_wsaSiteTemplateId field, and verified the template ID and name as found previously.
- Also executed these commandlets in an elevated SharePoint Management Shell to further verify template ID and name:
(Get-SPweb -Identity [web ID]).WebTemplate
(Get-SPweb -Identity [web ID]).WebTemplateId - Referring to SharePoint 2010 template listings, found that this template ID and name were associated with the Project Workspace site definition.
- Compared the contents of
...\TEMPLATE\SiteTemplates\
on the SharePoint 2010 and 2013 farms (14 and 15 hives), found the PWS folder in...\14\TEMPLATE\SiteTemplates\
but not in...\15\TEMPLATE\SiteTemplates\.
Also noted that Microsoft Project was deployed and integrated with our SharePoint 2010 farm but not with our 2013 farm. - Copied entire PWS folder from
...\14\TEMPLATE\SiteTemplates\
on SharePoint 2010 farm to...\14\TEMPLATE\SiteTemplates\ and
on the SharePoint 2013 farm, and then re-executed the Site Collection Health Check, but the 13 Missing Site Template errors still appear in report. One minor change I noted was that, previously.
...\15\TEMPLATE\SiteTemplates\ - Compared the contents of
...14\TEMPLATE\1033\XML\
on the SharePoint 2010 and 2013 farms and found this filewebtemppwa.xml
in SharePoint 2010 but not in SharePoint 2013. - Viewing the contents of this file, found an entry referring to "PWS:"
<Template ID="6215" SetupPath="SiteTemplates\PWS" Name="PWS">
- Copied this file from production SharePoint 2010
[SP2010P]\C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML\
to development 2013[SP2013D]\C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML\
ensuring that it is in the same 14 file have on both. - Re-executed the Site Collection Health Check, this time, the 13 missing site template errors appear as " - PWS#0".
- Copied this file from production SharePoint 2010
[SP2010P]\C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML\
to development 2013[SP2013D]\C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\1033\XML\
ensuring that this time the file is copied to the 15 file hive in the SharePoint 2013 development farm. - Re-executed the Site Collection Health Check. No upgrade-blocking issues appear.
Solution
- When "Missing Site Template" errors appearing the Site Collection Health Check Results report, determine the name of the template that is missing, and then copy it from appropriate file hive on the source 2010 farm to both the 14 and 15 file hives in the destination 2013 farm.
References
- SharePoint 2010 TEMPLATE directory
- What is difference between site template and site definition?
- RESOLVE “MISSING SITE TEMPLATES SHAREPOINT 2013 UPGRADE ERROR
- Scripted deployment reference (SharePoint Foundation 2010)
- Migrating PS 2010 to PS 2013 Walkthrough
- Upgrade from SP 2007 to SP 2013 - Missing template (PWS) issue
- How to find the SharePoint Site Template being Used
- Upgrading your Content DB to SharePoint 2010 – Part 1, The preupgradecheck
- Helpdesk Template in 2013?:
- SharePoint 2010 How do you work out what type of site a site it?
- Creating, deploying and updating custom site definitions
- Resolving Missing References when upgrading to SharePoint 2010
- SharePoint 2010 Missing Site Definition Error
Notes
- Site templates are stored in this location:
[root]:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\[12,14,15,16]\TEMPLATE\SiteTemplates\
- tbd
No comments:
Post a Comment