Activating the Document ID feature by code causes document sets welcome pages to show each web part twice

document id

This is a weird one - I have a feature, that when activated loops over a list of other features and activates them - using "Force" :

site.Features.Add(currentFeatureID, true);

This works fine on most sites, but in Document Center sites, where the document ID feature is already activated document sets in the site suddenly show the web parts on the welcome page twice. I debugged it, and it turns out that this happens when the document ID feature is the culprit. However, this doesn't happen if I activate the ID feature using powershell.

My only solution at the moment is to check if the feature is already activated before activating it. This stopped the problem, but doesn't explain it.

Certifications

microsoft sharepoint server 2010 certified master
microsoft sharepoint 2016 certified professional badge
microsoft certified expert badge

Subscribe for Sharepoint Tips & Tricks

Exclusive offers in your inbox

© Copyright 2023 Sharepoint Tips