Monday, May 20, 2013

Test-SpContentDB MissingFeature, MissingSetupFile, MissingWebPart, MissingAssembly. And not so Fabulous 40 templates.

I am on verge of finally get my farm migrated to SP2013 on-prem.
I was suffering with cleaning customization by not so fabulous for me  "Fabulous 40  templates".

I ended up transferring content from customized sites to OTB sites and deleting sites based on the custom site definition.
Then I de-activated features and de-installed custom wsp.

Once I have done that part, I ran test-spcontentdb on my current prod SP2010. To my surprise I got a lots of errors:

I have started analyzing the log and discovered that all missing customization are part of Fab 40!

Btw, Fab 40 has a lots of features that start with 75a0fea7 (Here is a quick and dirty look on customization by MS - List of Features with GUIDs)

Now, this post is intended to help some unfortunate souls who suffer from such behavior.

Obvious question in this situation: How can I get rid of MissingFeatures, MissingSetupFile, MissingWebPart, MissingAssembly?

Here is what I did:

1. I have started with Stsadm -o enumsites -includefeatures to find missing features and remove them via  SharePoint Feature Administration and Clean Up Tool

2. I have run following PowerShell commands that have mentioned : Removing [MissingFeature] Database & [MissingWebPart] WebPart class errors from SharePoint 2010
    These PS commands helped me with most MissingFeatures. But MissingSetupFiles, MissingWebParts, MissingAssemblies errors were still in place.
Then I moved to another step of cleansing:

3.I had to clean SQL tables directly based on the following articleFixing Test-SPContentDatabase warnings
In my case sp object were already deleted, but for some reason sql tables still have rows with no corresponded SharePoint objects. So, I had to delete records directly in SQL.
I know, I know, it's not recommended, but I didn't get another option....

4. Still got MissingAssembly. So, I used this script: REMOVE ORPHAN EVENT HANDLERS IN SHAREPOINT LISTS
And once again, in my case I didn't find correspoded to SQL record SharePoint object and had to delete records directly from EventReceivers table.

1 comment:

  1. Let me know if you can help in below issue;

    I am trying to migrate SP 2010 to SP 2013 using contend db upgrade method.

    Before runing Test-SPContentDatabase command I deployed all the custom wsps.

    But still I am getting feature not found. No change in GUIDs.

    I deployed branding feature in compitible mode and rest of other features are in native mode.

    upgrade error log shows both types of features are missing.

    But when I create Site Collection on default content database then I can see custom features are avaiable.

    thansk in advance

    - Sudarshan S Vatturkar