umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.49k stars 2.69k forks source link

Update from 10.4.2 to 10.5.0 #14145

Closed thomashdk closed 1 year ago

thomashdk commented 1 year ago

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

10.4.2 -> 10.5.0

Bug summary

After updating from 10.4.2 to 10.5.0, I'm getting this issue:

Umbraco.Cms.Core.Exceptions.BootFailedException: An error occurred while running the unattended upgrade.
The database configuration failed with the following message: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_umbracoContentVersionCleanupPolicy_cmsContentType_nodeId". The conflict occurred in database "Kommuneplatformen-umb10-new", table "dbo.cmsContentType", column 'nodeId'.
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_umbracoContentVersionCleanupPolicy_cmsContentType_nodeId". The conflict occurred in database "Platformen, table "dbo.cmsContentType", column 'nodeId'.

Specifics

Steps to reproduce

Umbraco.Cms.Core.Exceptions.BootFailedException: An error occurred while running the unattended upgrade. The database configuration failed with the following message: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_umbracoContentVersionCleanupPolicy_cmsContentType_nodeId". The conflict occurred in database "Kommuneplatformen-umb10-new", table "dbo.cmsContentType", column 'nodeId'. The INSERT statement conflicted with the FOREIGN KEY constraint "FK_umbracoContentVersionCleanupPolicy_cmsContentType_nodeId". The conflict occurred in database "Platformen, table "dbo.cmsContentType", column 'nodeId'.

Expected result / actual result

Upgrade and the solution should start up again.

github-actions[bot] commented 1 year ago

Hi there @thomashdk!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:

Zeegaan commented 1 year ago

@thomashdk What database provider are you using here ? 😁

thomashdk commented 1 year ago

@thomashdk What database provider are you using here ? 😁

Hi I'm using Microsoft SQL Server 2019

thomashdk commented 1 year ago

image

thomashdk commented 1 year ago

I deleted the dbo.umbracoContentVersionCleanupPolicy. That did the trick

Zeegaan commented 1 year ago

Hmmm I cannot reproduce this 🤔 This is me trying to upgrade a 10.4.2 site (with just 1 contenttype & 1 content node) to a 10.5.0 and that's working fine 🤔 image Did you have any custom cleanup policy setup for a specific content type? 😅

thomashdk commented 1 year ago

Hmm no, did have any custom cleanup. Strange..

thomashdk commented 1 year ago

I'm getting this error also:

@MessageTemplate | Error occurred executing {WorkItem}.

System.NotSupportedException: Variation "da,<null>" is not supported by the property type.
   at Umbraco.Cms.Core.Models.Property.SetValue(Object value, String culture, String segment)
   at Umbraco.Cms.Core.PropertyEditors.NestedPropertyIndexValueFactoryBase`2.GetNestedResults(String keyPrefix, String 
      culture, String segment, Boolean published, IDictionary`2 propertyTypeDictionary, TItem 
   nestedContentRowValue)+MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at Umbraco.Cms.Core.PropertyEditors.NestedPropertyIndexValueFactoryBase`2.Handle(TSerialized 
   deserializedPropertyValue, IProperty property, String culture, String segment, Boolean published)
   at Umbraco.Cms.Core.PropertyEditors.JsonPropertyIndexValueFactoryBase`1.GetIndexValues(IProperty property, String 
   culture, String segment, Boolean published)
   at Umbraco.Cms.Infrastructure.Examine.BaseValueSetBuilder`1.AddPropertyValue(IProperty property, String culture, String 
   segment, IDictionary`2 values)
   at Umbraco.Cms.Infrastructure.Examine.ContentValueSetBuilder.GetValueSetsEnumerable(IContent[] content, Dictionary`2 
   creatorIds, Dictionary`2 writerIds)+MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at Umbraco.Cms.Infrastructure.Examine.ContentIndexPopulator.IndexPublishedContent(Int32 contentParentId, Int32 
   pageIndex, Int32 pageSize, IReadOnlyList`1 indexes)
   at Umbraco.Cms.Infrastructure.Examine.ContentIndexPopulator.PopulateIndexes(IReadOnlyList`1 indexes)
   at Umbraco.Cms.Infrastructure.Examine.IndexPopulator.Populate(IIndex[] indexes)
   at Umbraco.Cms.Infrastructure.Examine.ExamineIndexRebuilder.RebuildIndex(String indexName, TimeSpan delay, 
   CancellationToken cancellationToken)
   at Umbraco.Cms.Infrastructure.Examine.ExamineIndexRebuilder.<>c__DisplayClass9_1.<RebuildIndex>b__1()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext 
   executionContext, ContextCallback callback, Object state)
   --- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   --- End of stack trace from previous location ---
   at Umbraco.Cms.Infrastructure.HostedServices.QueuedHostedService.BackgroundProcessing(CancellationToken 
   stoppingToken)
thomashdk commented 1 year ago

Found workaround here: https://github.com/umbraco/Umbraco-CMS/issues/14096