Tuesday, December 18, 2018

SharePoint upgrade missing feature reference issue

While I tried to migrated the SharePoint 2010 Data base to SharePoint 2016 through the database upgrade approach , I received the below missing feature error

Database [database] has reference(s) to a missing feature: Name = [PowerPivot Feature 
                  Integration for Site Collections], Id = [1a33a234-b4a4-4fc6-96c2-8bdb56388bd5

usually if you follow this blog Link, you should be able to clean up the missing feature , if not by using the feature admin tool you should be able to clean up the faulty feature at the source . But in this case neither worked . SharePoint 2010 was not showing that this feature was activated , but the upgrade was failing in SharePoint 2013/2016 .

Hence i decide to do some digging myself  in SQL and try to resolve the issue , below are the steps followed to resolve the issue




1.      Open SSMS in source (SharePoint 2010 /2013), run the below script to find the tables in DB where the missing feature is referenced

USE [Name of the DB]
GO
SELECT t.name AS table_name,
SCHEMA_NAME(schema_id) AS schema_name,
c.name AS column_name
FROM sys.tables AS t
INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
WHERE c.name LIKE '%FeatureId%'
ORDER BY schema_name, table_name;

2.      Query result would provide the list of tables in SQL

table_name        schema_name   column_name
AllLists                  dbo                       tp_FeatureId
CustomActions   dbo                       FeatureId
Features              dbo                       FeatureId
FeatureTracking dbo                      FeatureId

3.      Open up each table in SQL and identify the row as per sample query

Select * from [data base name].[dbo].[tablename] where tp_featureID = ‘guid of missing feature’

Results would provide the webID of the website

4.      Open up any of the SharePoint server in the farm and execute the below query , this would list all the site and webs with the ID
5       
Get-SPWebApplication http://sharepoint.dev.symetra.com/ | Get-SPSite -Limit All | Get-SPWeb -Limit All | Select Title, URL, ID, ParentWebID | Export-CSV C:\InfoArch.csv –NoTypeInformation

6.      Navigate to the website and clean up the component which is referred by the feature .

I In my case there was a faulty power pivot library at SharePoint 2010 , I went ahead and cleaned up the library at 2010

Thursday, December 13, 2018

Sharepoint 2016 User profile sync unable to update manager field



I was migrating a User profile from SharePoint 2010 to SharePoint 2013 and then to SharePoint 2016 . During the process of migration I did decide to leave out the sync and social DB , as we wanted the   new social features available in SharePoint 2016 and we decided not having to migrate the social and sync DB from SharePoint 2010 would be a cleaner approach .

As per the Microsoft article I did migrate the User profile DB and the MySite DB through Data base upgrade process. Everything did migrate all fine and I did opt for "Active Directory Import" to configure the new Sync in SharePoint 2016 . I was able to create a custom property to import the "Employee ID " from AD and post completion of Full sync ,I was able to see the Employee ID property in user's profile .

Strangely I noticed that the manager field was not being updated , yes it did have the old values carried over from SharePoint 2010 , but if the manager field was updated in AD , it was not being synced to SharePoint . Did restart the service and triggered full sync of user profile on few occasion , but this did not resolve the issue .

But below steps finally synced the manager field from AD to SharePoint 2016 .


  1. Clicked "Configure Synchronization Settings" in central admin of SharePoint 2016
  2. Since I had configured the "  Active Directory Import " to sync the data from AD , this option was selected .
  3. Select the "Enable External Identity Manager" 
  4. click OK
  5. Now get back to the same screen ""Configure Synchronization Settings"
  6. But this time select the right setting "Use SharePoint Active Directory Import"
  7. Click OK
  8. Trigger the "Full Sync"

This resolved the issue and manager field for all the users were updated .

Note : Manager property should not be configured with any import filed in "Manage User Property" this field has to be kept blank , only then the SharePoint 2016 would sync  the data from AD .

Previously in SharePoint 2010 , you had to map the SharePoint "manager" user property with "manager" field in "Property mapping for synchronization"

Friday, September 21, 2018

SharePoint 2010 to SharePoint 2016 MySite blog migration issue



While we were trying to migrate the User profile DB along with the Mysite from SharePoint 2010 to SharePoint 2016 by having a hop at SharePoint 2013 , we faced the below issue

It worked all fine in SharePoint 2013 , but had some issue in SharePoint 2016

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe

On closer look at the web.config and logs , I found that the entries were missing for 14.0.0.0 version in Sharepoint 2016 , fix was to add below entries in web.config file which was hosting the Mysite webapplication

<SafeControl Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebPartPages" TypeName="BlogAdminWebPart" Safe="True" SafeAgainstScript="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebPartPages" TypeName="BlogLinksWebPart" Safe="True" SafeAgainstScript="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebPartPages" TypeName="BlogMonthQuickLaunch" Safe="True" SafeAgainstScript="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebPartPages" TypeName="BlogYearArchive" Safe="True" SafeAgainstScript="True" />

Issue seems to be either the upgrade had failed in SharePoint 2013 or SharePoint 2016 , hence failed to upgrade the default webpart for blogs , or MS forgot to update their webconfig file 




Thursday, June 21, 2018

SharePoint 2016 search crawl issue

I had the below issue in our SharePoint 2016 farm , for some reason it was working fine until a patch was applied and the server was rebooted . The patch had nothing to do with it though

Issue 

1)Access is denied. Verify that either the Default Content Access Account has access to this repository, or add a crawl rule to crawl this repository. If the repository being crawled is a SharePoint repository, verify that the account you are using has "Full Read" permissions on the SharePoint Web Application being crawled.

2)Crawling of this item failed, HTTP 504: Gateway Timeout. Try accessing the item using a browser on the crawl machine. If URL is accessible through the browser, it is possible that the crawl targets for that host are not configured correctly. Please contact the Host Administrator for assistance
Error refers to disabling the loop back but this has already been done , but we can remove the registry entry and try again though , also we could try applying the latest patch . But all this would require change in registry and reboot of server .

First error message was seen for the HTTP site and the second error message was seen for the HTTPS site

1)We did try to add the crawl rule and assign certificates to crawl the HTTPS URL , but nothing resolved the issue
2)But as a standard procedure , you will need to follow the steps in below link to make sure you have the right configuration for search

https://social.technet.microsoft.com/wiki/contents/articles/25863.access-is-denied-verify-that-either-the-default-content-access-account-has-access-to-this-repository-or-add-a-crawl-rule-to-crawl-this-repository.aspx

3)I had all the configuration set correctly , but it still would not work
Finally by clearing the proxy did the magic

below  are the script to be run as admin on the SharePoint server which is defined as crawler

netsh winhttp show proxy
netsh winhttp reset proxy
Net stop Osearch16
Net start Osearch16