0

I am receiving an error message saying "A duplicate content type name "Display Template" was found." when trying to activate publishing feature at SharePoint online site collection.

this site collection was initially created as a team site.

pls share your thoughts.

2

Use SharePoint online Management Shell to activate the feature.

To identify the exact feature ID, we need to browse the manage site features ro site collection feature page and inspect the specific feature button in browser developer tools using F12 and grab the unique GUID.

use that in the powershell with example as shown below:

Import-Module Microsoft.Online.SharePoint.Powershell
$siteurl="https://sitecollectionurl.sharepoint.com/sites/testsite"

[Microsoft.SharePoint.Client.ClientContext]$clientContext = New-Object Microsoft.SharePoint.Client.ClientContext($siteurl)   

$username="loginname@domain.com"
$secure_string_pwd = convertto-securestring "yourpassword" -asplaintext -force

$clientContext.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $secure_string_pwd)


$site = $clientContext.Site;    
$featureguid = new-object System.Guid "f6924d36-2fa8-4f0b-b16d-06b7250180fa"     
$site.Features.Add($featureguid, $true, [Microsoft.SharePoint.Client.FeatureDefinitionScope]::None);     
$clientContext.ExecuteQuery();    

Reference blog for more details

  • What difference does it make when activating through UI or Management shell? – Ali Jan 30 '17 at 0:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.