Tuesday, December 17, 2013

Fix Content Type Publishing : The compatibility level 14 of the content type hub site is different from the compatibility level of this site 15.

After we migrate from SharePoint 2010 environment to a SharePoint 2013 environment, we need to follow few post upgrade steps.

Let’s assume we had a content type hub site collection where other sites subscribe to consume content types. You can learn more on Content Types and Content Type publishing through a content type hub by referring this article

After we migrate, our content type hub site collection is still in the 14 compatibility mode (SharePoint 2010 mode). Since it in the old compatibility level, newly created site collections (SharePoint 2013 mode) can’t subscribe to the content type hub.

To fix the issue we need to either create a new Content Type Hub site collection or upgrade the existing site collection. Following are the steps required to upgrade/create content type hub site collection

1. Upgrade the content type hub site collection

You can either do it manually or by PowerShell statements

  1. Upgrade-SPSite "http://sp13/sites/hub" -VersionUpgrade -QueueOnly

2. Check/ Change the content type hub Url.

This step is not mandatory. But let’s assume we need to keep the existing content type hub site collection in 14 mode, and need to create a new site collection for the new environment. In that case we will skip the 1st step.

  • Create new site collection
  • Create content types as available in the old content type hub site collection
  • Enable the “Content Type Syndication Hub” site collection feature
  • Use following PowerShell statement to make the new site collection as the
  1. $newContentHub = "http://sp13/sites/hub15"
  2. $mms = Get-SPServiceApplication -Name "Managed Metadata Service"
  3. Set-SPMetadataServiceApplication -Identity $mms -HubURI $newContentHub

3. Publish/ Republish Content Type Hub.

Since we changed the content type hub site collection, we need to publish or republish content types those need to be published to other sites.

image

4. Run required timer jobs

We need to run two timer jobs to make the changes reflect in subscribed sites. In central administration go to Monitoring > Review Job Definitions to select timer jobs.

  • Select the timer job “Content Type Hub” and click Run Now
  • Select the timer job “Content Type Subscriber” for the web application and cluck Run Now. If you have multiple web applications those are subscribed to content type hub, you have to run the Content Type Subscriber jobs for all of them

Monday, December 2, 2013

Reusing SharePoint custom service application proxy groups

When we create a new web application, we need to associate it with a service application proxy group. Either we can associate it with default proxy group or a custom group
image
Let’s say we need to create 2 web applications those require only Managed Metadata Service as a service application. In that case we need to go for a custom proxy group.
If we create those web applications using custom proxy group we can see 2 separate “Custom” proxy groups created.
Although they contain same service application proxies, We can’t reuse the groups by default. In that case if we need to associate a new service application proxy, we need to add it to each and every “Custom” group.
image
Is there any way to create named proxy groups where we can reuse for our web applications ?
We can use PowerShell cmdlets to create named proxy groups and add member service application proxies. Let’s say we create a proxy group named “Contoso” and we need only “Managed Metadata Service” for that group. Then we’ll need to provide following PowerShell commands.
New-SPServiceApplicationProxyGroup "Contoso"
$mmsproxy = Get-SPServiceApplicationProxy | where { $_.Name -eq “Managed Metadata Service” }
Add-SPServiceApplicationProxyGroupMember "Contoso" -Member $mmsproxy
Then we can see our group listed when we create a new web application (or changing the Service Application Association setting)
image
We can associate our existing sites using the Service Application Association section.

image
Now it looks very organized. If we need to associate new proxies we can add/remove them from our named proxy group which will be reflected for all associated web applications.