After upgrading and entering backoffice the request to /umbraco/management/api/v1/manifest/manifest/private fails with a 500 error. The response JSON is broken right in the middle of the contentment section. If I remove the Contentment nugets the error goes away. The logs give me a NotSupportedException with the message Runtime type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]' is not supported by polymorphic type 'System.Collections.Generic.IDictionary`2[System.String,System.Object]'. Path: $.meta.Fields.Config.
I have a couple of custom datatypes configured that I migrated to use IContentmentDataSource, but even when removing them (both from the backoffice and database and also commenting out the data source code) the error remains. This only happens when Umbraco isn’t in development mode. Ie on localhost it works fine.
I looked but couldn’t find any specific migration steps, am I missing something? Thanks.
Are you able to recreate this locally running in Production runtime mode? If so, you’re only option maybe to remove the Contentment data types one by one to see which one is causing the problem. Once you’ve narrowed it down, you can look at the JSON for the config in the database to see if there’s something in there that is causing a problem.
Obviously, make sure you have backups and don’t do this on a live site!
Do you mean remove the built-in Contentment datatypes? Because all custom Contentment datatypes are already removed. The problem is Contentment and all other packages refuse to load with this error so I can’t easily remove any datatypes in the backoffice. I could do it manually with SQL but wouldn’t Umbraco just re-add them on boot?
If you can’t do that, maybe extract the data type config JSON from the config column in the umbracoDataType table and ask AI to review in case it can spot anything obvious?
When Umbraco’s TypeFinder detects a custom class/DTO that implements an IDictionary<string, object>, it will trigger a polymorphism check, which is what threw the original error. (I see this as an edge-case, not something the majority of users will experience).
Following the issue through with @jrunestone, we reached a fix and it’s resolved in Contentment v6.3.3 (and v7.2.1) .