Thursday, July 25, 2019

O365 SharePoint - Duplicate Content Type

Scenario
  • You try to create a new sub-site from a template or try to create a new content type
  • Office 365 SharePoint Online (SPO) environment
Issue
  • Internal SharePoint validation identifies a duplicate Content Type
    • Typically this is due to a migration of content types or a failed feature activation/deactivation
    • Ex: "A duplicate content type name "Document Set" was found.
  • You cannot remove the duplicate Content Types because they are part of a feature or in-use
Resolution
  • Rename the duplicate Content Types using the Site Settings/Content Types interface
  • _hidden content types (like "System Media Collection") require using PNP PowerShell cmdlets to get the ID to pass into the browser URL
    $smc = Get-PnPContentType "System Media Collection"
    $smc.Id
    StringValue                                  TypeId
    -----------                                  ------
    0x0120D50067B20E13E9C3AA458AEF3A8392B641FD01 {da0f1e90-296f-480e-bc27-cefe51eff241}
  • Edit another content type and then replace the ctype query string parameter to edit the _hidden content type
    • Replace the following from the Document Set Edit Name Page
      /_layouts/15/ctypedit.aspx?ctype=0x0120D50067B20E13E9C3AA458AEF3A8392B641FD