{"id":3360,"date":"2012-02-08T15:00:08","date_gmt":"2012-02-08T07:00:08","guid":{"rendered":"http:\/\/www.sharepointboost.com\/blog\/?p=3360"},"modified":"2023-07-31T11:40:00","modified_gmt":"2023-07-31T03:40:00","slug":"how-to-remove-missing-webpart-during-sharepoint-upgrade","status":"publish","type":"post","link":"https:\/\/www.boostsolutions.com\/blog\/how-to-remove-missing-webpart-during-sharepoint-upgrade\/","title":{"rendered":"How to Remove Missing WebPart during SharePoint Upgrade"},"content":{"rendered":"<p>If you are upgrading SharePoint 2007 to SharePoint 2010 and getting &#8220;MissingWebPart&#8221; error when using the Test-SPContentDatabase cmdlet in PowerShell, this tip will help you diagnose the issue.<\/p>\n<p><!--more-->Following is the original error:<\/p>\n<p>Category: MissingWebPart<\/p>\n<p>Error: True<\/p>\n<p>UpgradeBlocking : False<\/p>\n<p>Message: WebPart class [8c8bca43-cbc1-da50-d518-54614c79b3f5] is referenced [1] times in the database [WSS_Content], but is not installed on the current farm. Please install any feature\/solution which contains this web part.<\/p>\n<p>Remedy: One or more web parts are referenced in the database [WSS_Content], but are not installed on the current farm. Please install any feature or solution which contains these web parts.<\/p>\n<p>As you can see, the error message gives you a WebPart GUID [8c8bca43-cbc1-da50-d518-54614c79b3f5] and the name of the content database [WSS_Content]. What we need to find out is on which page it is referenced in the database. For this we can run a SQL SELECT query on the &#8220;AllDocs&#8221; table in the content database exhibiting the problem. For example, you would run the following command to find details of the web part with the class ID &#8220;8c8bca43-cbc1-da50-d518-54614c79b3f5&#8221;:<\/p>\n<p><span style=\"color: #3366ff;\">select<\/span> AllDocs.SiteId, WebId, Webs.Title <span style=\"color: #3366ff;\">as<\/span><span style=\"color: #ff6600;\"><span style=\"color: #ff0000;\">&#8216;Web Title<\/span>&#8216;<\/span>, ListId, DirName, LeafName <span style=\"color: #3366ff;\">from <\/span>AllDocs <span style=\"color: #c0c0c0;\">innerjoin<\/span> WebParts <span style=\"color: #3366ff;\">on<\/span> AllDocs.Id <span style=\"color: #c0c0c0;\">=<\/span> WebParts.tp_PageUrlID <span style=\"color: #c0c0c0;\">innerjoin<\/span> Webs <span style=\"color: #3366ff;\">on <\/span>AllDocs.WebId <span style=\"color: #c0c0c0;\">=<\/span> Webs.Id <span style=\"color: #3366ff;\">where<\/span> WebParts.tp_WebPartTypeID <span style=\"color: #c0c0c0;\">=<\/span><span style=\"color: #ff0000;\">&#8216;8c8bca43-cbc1-da50-d518-54614c79b3f5&#8217;<\/span><\/p>\n<p>It will list a very useful output, as shown in this example:<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/02\/PIC.1Removing-Missing-WebPart-during-SharePoint-Upgrade.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3361\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/02\/PIC.1Removing-Missing-WebPart-during-SharePoint-Upgrade.png\" alt=\"\" width=\"559\" height=\"137\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/02\/PIC.1Removing-Missing-WebPart-during-SharePoint-Upgrade.png 559w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/02\/PIC.1Removing-Missing-WebPart-during-SharePoint-Upgrade-300x73.png 300w\" sizes=\"(max-width: 559px) 100vw, 559px\" \/><\/a><\/p>\n<p>To remove the web part, type the page URL in the browserformat as &#8220;http:\/\/&lt;SiteURL&gt;\/&lt;DirName&gt;\/&lt;Leafname&gt;?contents=1&#8221;. In this example, type the following URL in the browser:<\/p>\n<p>http:\/\/mossdev\/default.aspx?contents=1<\/p>\n<p>The screenshot below shows a web part maintenance page, you can delete the missing WebParts on the page.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/02\/PIC.2Removing-Missing-WebPart-during-SharePoint-Upgrade.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3362\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2012\/02\/PIC.2Removing-Missing-WebPart-during-SharePoint-Upgrade.png\" alt=\"\" width=\"559\" height=\"211\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/02\/PIC.2Removing-Missing-WebPart-during-SharePoint-Upgrade.png 559w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2012\/02\/PIC.2Removing-Missing-WebPart-during-SharePoint-Upgrade-300x113.png 300w\" sizes=\"(max-width: 559px) 100vw, 559px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are upgrading SharePoint 2007 to SharePoint 2010 and getting &#8220;MissingWebPart&#8221; error when using the Test-SPContentDatabase cmdlet in PowerShell, this tip will help you diagnose the issue.<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[125],"tags":[306,12,305],"_links":{"self":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3360"}],"collection":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=3360"}],"version-history":[{"count":5,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3360\/revisions"}],"predecessor-version":[{"id":9254,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3360\/revisions\/9254"}],"wp:attachment":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=3360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=3360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=3360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}