AI OnAI Off
The exact same thing happened to us yesterday. Surely, there should be a uniqueness constraint on tblContentType.ContentTypeID? Feels like a pretty serious error. And for us it did not work to roll back the code base, I had to manually delete the duplicate item in tblContentType and tblPropertyDefinition tables.
We're on EPiServer 8.8.2.
Reported bug CMS-1712: There is already a content type registered for type
We currently have the following setup:
Akamai FEO,
EPiServer 7.18 running on an Azure Web App scaled up to two instances.
When deploying new code in the live environment the following message appeared: "There is already a content type registered for type ".
In the stack trace we noted: EPiServer.DataAbstraction.DefaultContentTypeRepository.ValidateUniqueness(ContentType contentType) +299
We rolled back to the previous version and got the site up and running again.
We looked at the ContentTypes in admin/ContentType and noticed that there were duplicate entries for that block.
In the database there were two entries created 3 ms after eachother with the same GUID, they were exact copies except for the created date.
When viewing the settings for both of the blocks, one of them had connected properties and the other one was empty.
When trying to "restore to default" we got the exact same error message for both blocks.
We copied a ContentType row in our local dev environment and got excactly the same issue.
When we deleted the duplicated row (without the connected properties) in production the problem was resolved.
We have no idea what caused the duplicate entries in the production environment, but now we at least know how to solve it if it appears again.