Closed vmachacek closed 1 year ago
Hi @vmachacek
Thanks for reporting.. Sounds very weird. Can you confirm the dbo.umbracoContentVersionCleanupPolicy
table contains duplicate contentTypeIds ?
this is what is in that table
contentTypeId keepAllVersionsNewerThanDays keepLatestVersionPerDayForDays preventCleanup updated
5647 NULL NULL 0 2022-05-31 23:27:12.123
4902 NULL NULL 0 2022-05-31 23:24:18.357
4262 NULL NULL 0 2022-06-10 12:58:25.280
5647 NULL NULL 0 2022-05-31 23:27:12.123
4902 NULL NULL 0 2022-05-31 23:24:18.357
4262 NULL NULL 0 2022-06-10 12:58:25.280
there are 3 content types but each is there twice
deleting duplicates solved the issue and now app is pointing to correct db, thanks!
I think we should probably keep this issue open, as there's a missing primary key on this table that should have prevented the duplicate from being added in the first place. I've checked a couple of local installs and can also see it's missing.
I agree Andy..
Seems like there is a missing primary key on contentTypeId
. But I still do not understand how it ended up having duplicates.
Fixed in https://github.com/umbraco/Umbraco-CMS/pull/12684 thanks for reporting 🐛
Which exact Umbraco version are you using? For example: 9.0.1 - don't just write v9
10.0.0
Bug summary
After I updated Umbraco the updater did hist job and redirected to Backoffice where I saw some errors coming from bottom. And when I loaded the website it was down with 500.
Specifics
The exception with full stacktrace
it is coming from this .ToDictionary() call - for some reason there are more than one content types of same Id ( ?? ) https://github.com/umbraco/Umbraco-CMS/blob/ce9f92909b3fe8b127afab48dd7970dcc859b716/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs#L163
Steps to reproduce
Its a DB specific thing, probably cannot be reproduced easily
Expected result / actual result
Expected Umbraco upgades fine,
Actual Umbraco is stucked and broken