Question

I have created a Content Type Hub and several content types and published them.

Then I realised that I used the blank site template which won't work because it's missing several features, so I deleted that site collection and created a new one with the same URL.

I then noticed that the content types from the old CTH were still on the subscribing sites (of course). Tried to delete them but they came back.

Tried checking the checkbox for "Refresh all published content types on next update" but it didn't help.

Tried Set-SPMetadataServiceApplication -Identity "Managed Metadata Service" -HubURI $hub.url to refresh things maybe, but it didn't help.

As a last resort I do have a backup of the old CTH, I can load that back up and unpublish. Is this my only choice?

Was it helpful?

Solution

Turns out I had to bring the old content type hub back, but I didn't have to use my backup. The old site collection was still in the database, as an "SPDeletedSite"

I took a backup of my new CTH using backup-spsite (though ultimately unnecessary), deleted the new CTH, and used the restore-spdeletedsite powershell command to bring back the old CTH. i then unpublished each content type i had previously published, and then deleted the old CTH again, and used restore-spdeletedsite to bring back the new CTH.

I still do not know how to remove orphaned content types once the original CTH is completely gone... Sounds like they stick around for 30 days. After that, I'm pretty sure you'd have to create a new Managed Metadata Service to fix this.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top