SharePoint HealthReport - Missing WebPart

Published on Monday, 15 March 2021

This is part of a series on SharePoint Health Report issues, because I can never remember what to do about them.

Missing WebPart

The warning looks like this:

Category        : MissingWebPart
Error           : False
UpgradeBlocking : False
Message         : WebPart class d3ccbd27-51f0-eb57-a603-5556d226a05a] 
                  (class [Microsoft.SharePoint.WebPartPages.AccessRequestsCSRBridge] from
                  assembly [Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral,
                  PublicKeyToken=71e9bce111e9429c]) is referenced [7] times in the database
                  [ContentDatabaseName], but is not installed on the current farm. Please install
                  any feature/solution which contains this web part.
Remedy          : One or more web parts are referenced in the database [ContentDatabaseName],
                  but are not installed on the current farm.  Please install any 
                  feature or solution which contain these web parts.

The solution is either to install the missing solution or activate the missing feature - as the warning suggests. Alternatively it is possible to remove the offending web part from the page that it has been placed on.

To find the page, a query to the database has to be utilized:

select d.SiteId, d.WebId, d.ListId, w.Title as [Web], w.FullUrl as [WebUrl],
d.DirName, d.LeafName, d.UIVersion as [current page version], wp.tp_PageVersion from AllDocs d with (nolock)
inner join AllWebParts wp on wp.tp_PageUrlID = d.Id
inner join AllWebs w on d.WebId = w.id
where wp.tp_Class = 'Microsoft.SharePoint.WebPartPages.AccessRequestsCSRBridge'
and wp.tp_Assembly = 'Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'

wp.tp_Class should be equal to the class given in the warning. wp.tp_Assembly should be equal to the assembly given in the warning.

The resulting lines will show all pages still in SharePoint that reference the missing web part. Adding ?contents=1 to the URL of the page will list all web parts on the page and will contain the possibility to remove web parts.