11. Upgrading SharePoint Site Definitions from v2 to v3: DEALING WITH UPGRADE ISSUES
Note: This blog is a work in progress, I will be adding tips as I work through various issues.
Remediating Problems with Upgraded Webs
To get feedback on errors instead of the generic "An unexpected error has occurred", go into the web.config and set custom errors to off:
<customErrors mode="Off" />
And turn on tracing and the callstack by setting both to true:
<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="true">
Also there can be valuable info in the Event Log, so check there for more information on any exceptions that may have been thrown.
Checking for Unghosted pages using SQL:
SELECT Docs.DirName, Docs.LeafName
WHERE (Docs.Type = 0)
AND (Docs.SetupPath IS NOT NULL)
AND (dbo.Docs.DocFlags & 64 = 64)
Using C# code to reghost:
static void Main(string args)
string siteUrl = "";
SPSite Site = new SPSite(siteUrl);
foreach (SPWeb Web in Site.AllWebs)
Fixing a corrupted home page:
Fixing a UpgLandingPgRedir.aspx forwarding link:
Go into Site Settings on the site, and in Look and Feel > Welcome page change the url to point at default.aspx
Fixing Web Part Errors which may look like this (some of these issues may be related to the way the SSP is set up, still researching that):
Object reference not set to an instance of an object. etc...
[NullReferenceException: Object reference not set to an instance of an object.]
Append "?contents=1" to the default.aspx url to access the Remove Web Parts Maintenance Page. If the original site was an SPS03 Area, try deleting the following web parts if present:
- Area Detail Part (CategoryDetail)
- Area Details (CategoryDetail)
- Category Detail
- Templates (CategoryDetail)
If the problem area is a Site Directory, then you may see an error that starts out:
"The Shared Service Database has not been provisioned. Try the operation again after provisioning is complete."
In this case, delete the Area Detail and Sites (ListViewWebPart) web parts. Note that hitting "Back to Web Page" after deleting these web parts will still throw the same error, but if you navigate out to the parent site, and then to the Site Directory, you'll see it is now working.