Content Type not being updated from code


I have an issue where a content type is not being reverted to code after choosing 'revert to default' from the ct settings in admin. It only increments the version number after saving it via the UI.

I have looked at this thread that states that if another developer manually updates the same property on the same database/CMS then EPiServer ignores your changes. Does this mean that even if you 'revert to default' and click save to commit that synchronization to the DB, EPiServer ignores your changes? I have previously tried to set 


to perform a manual sync in admin section, without success.

I don't really see how I can force the database to update to reflect the changes in the model. I'm using v11.15.

Jun 25, 2021 10:56

Hi George,

Try the first solution given on below blog post-

Jun 25, 2021 11:17
George Duncan - Jun 25, 2021 12:10
I don't think scripting directly against the database is an acceptable solution. It certainly cannot be an officially sanctioned one.

At any rate, I cannot replicate the error message relating to that blog posts' issue for the offending content type, so attempting this isn't really an option here.

Any other solutions? For the record, I have updated content types many times before from code on this solution without issue.

So, I went and tried the quasi-solution at

Anyway, I backed up my dev database and amended the script to

UPDATE [dbo].[tblContentType]
SET [Version] = REPLACE(Version, '', '')
WHERE [Name] = 'ImageFile' AND [Version] = ''

and the content type in the backend changed back to Great, right? 

Wrong. The content type still does not pick up the new field from code, and i'm looking at the possibility of having to write my own scheduled job to update the offending content type using the repository.

Edited, Jun 28, 2021 13:43

Is the version is correct now? and the yellow warning on the content type is gone?

if yes then please try to reset your IIS and rebuild the solution and publish it again.

Jun 28, 2021 13:49

The version is correct, but the new field hasn't been added from code, even after an IIS reset and rebuild/republish. There was never any yellow warning to begin with on the content type, nor any error relating to this in the log.

Jun 28, 2021 14:27

It turns out this was some as-yet-unidentified build problem. I had another developer deploy from a newer build on the same CMS version and the issue was resolved.

Jul 14, 2021 15:45

I believe I'm having the same issue as this with a field name and started a thread before I saw this.  Here is the link with screenshots.

Aug 04, 2021 21:07
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.