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.4k stars 2.66k forks source link

Node with block list property failed to be shown after upgrading project from U13.3.0 to U14-rc1 #16103

Open dydimitrov opened 4 months ago

dydimitrov commented 4 months ago

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

14.0.0-rc2

Bug summary

After upgrading the project from Umbraco 13.3.0 to Umbraco 14.0.0-rc2 I have nodes where I have only one property with a block list editor but when I try to access the node I get an error saying "The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0." JSON-Tokens-Error.md

U14-RC2-JSON-Tokens-Error

a

Specifics

No response

Steps to reproduce

Upgrade Existing project from U 13.3.0 to Umbraco 14.0.0-rc2 Try to open Node where Block list editor property is used

Expected result / actual result

To show the node with the property editor together with the items inside

github-actions[bot] commented 4 months ago

Hi there @dydimitrov!

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:

elit0451 commented 4 months ago

Hi there @dydimitrov 👋

Thanks for reaching out! I didn't get the same error as you - I managed to open the node with the Block list - but I can see an error in the logs from clicking on the items.

BLE

Plus the Block list data wasn't migrated. Here is the error I got for reference:

DISTRIBUTED CACHE IS NOT UPDATED. Failed to execute instructions ...

System.ArgumentNullException: Value cannot be null. (Parameter 'key')
   at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
   at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
   at Umbraco.Cms.Infrastructure.Search.ContentTypeIndexingNotificationHandler.Handle(ContentTypeCacheRefresherNotification args) in /UmbracoCMS/src/Umbraco.Infrastructure/Search/IndexingNotificationHandler.ContentType.cs:line 60
   at Umbraco.Cms.Core.Events.INotificationHandler`1.Handle(IEnumerable`1 notifications) in /UmbracoCMS/src/Umbraco.Core/Events/INotificationHandler.cs:line 35
   at Umbraco.Cms.Core.Events.NotificationHandlerWrapperImpl`1.<>c__DisplayClass0_0`2.<Handle>b__2(IEnumerable`1 handlerNotifications) in /UmbracoCMS/src/Umbraco.Core/Events/EventAggregator.Notifications.cs:line 284
   at Umbraco.Cms.Core.Events.EventAggregator.PublishCore[TNotification](IEnumerable`1 allHandlers, IEnumerable`1 notifications) in /UmbracoCMS/src/Umbraco.Core/Events/EventAggregator.Notifications.cs:line 109
   at Umbraco.Cms.Core.Events.NotificationHandlerWrapperImpl`1.Handle[TNotification,TNotificationHandler](IEnumerable`1 notifications, ServiceFactory serviceFactory, Action`2 publish) in /UmbracoCMS/src/Umbraco.Core/Events/EventAggregator.Notifications.cs:line 286
   at Umbraco.Cms.Core.Events.EventAggregator.PublishNotifications[TNotification,TNotificationHandler](IEnumerable`1 notifications) in /UmbracoCMS/src/Umbraco.Core/Events/EventAggregator.Notifications.cs:line 77
   at Umbraco.Cms.Core.Events.EventAggregator.Publish[TNotification,TNotificationHandler](IEnumerable`1 notifications) in /UmbracoCMS/src/Umbraco.Core/Events/EventAggregator.cs:line 26
   at Umbraco.Cms.Core.Events.EventAggregator.Publish[TNotification](TNotification notification) in /UmbracoCMS/src/Umbraco.Core/Events/EventAggregator.cs:line 18
   at Umbraco.Cms.Core.Cache.CacheRefresherBase`1.OnCacheUpdated(CacheRefresherNotification notification) in /UmbracoCMS/src/Umbraco.Core/Cache/Refreshers/CacheRefresherBase.cs:line 101
   at Umbraco.Cms.Core.Cache.PayloadCacheRefresherBase`2.Refresh(TPayload[] payloads) in /UmbracoCMS/src/Umbraco.Core/Cache/Refreshers/PayloadCacheRefresherBase.cs:line 47
   at Umbraco.Cms.Core.Cache.ContentTypeCacheRefresher.Refresh(JsonPayload[] payloads) in /UmbracoCMS/src/Umbraco.Core/Cache/Refreshers/Implement/ContentTypeCacheRefresher.cs:line 123
   at Umbraco.Cms.Core.Cache.PayloadCacheRefresherBase`2.Refresh(String json) in /UmbracoCMS/src/Umbraco.Core/Cache/Refreshers/PayloadCacheRefresherBase.cs:line 38
   at Umbraco.Cms.Infrastructure.Services.CacheInstructionService.RefreshByJson(CacheRefresherCollection cacheRefreshers, Guid uniqueIdentifier, String jsonPayload) in /UmbracoCMS/src/Umbraco.Infrastructure/Services/CacheInstructionService.cs:line 455
   at Umbraco.Cms.Infrastructure.Services.CacheInstructionService.NotifyRefreshers(CacheRefresherCollection cacheRefreshers, IEnumerable`1 instructions, HashSet`1 processed, CancellationToken cancellationToken) in /UmbracoCMS/src/Umbraco.Infrastructure/Services/CacheInstructionService.cs:line 401
   at Umbraco.Cms.Infrastructure.Services.CacheInstructionService.ProcessDatabaseInstructions(CacheRefresherCollection cacheRefreshers, IReadOnlyCollection`1 instructionBatch, CacheInstruction instruction, HashSet`1 processed, CancellationToken cancellationToken, Int32& lastId) in /UmbracoCMS/src/Umbraco.Infrastructure/Services/CacheInstructionService.cs:line 335

We will have a look 🙂

dydimitrov commented 4 months ago

Hi @elit0451 I would assume then that it is because I have dropdown and checkboxes in the block list editor items, also I have at least 2 levels of block lists. I mean I have the direct property under the node let's say BLE_Level1 --> BLE_level2--> Item containing dropdown or checkbox. I hope that this will help.

iOvergaard commented 1 month ago

@dydimitrov A lot of migrations got fixed just before the launch of 14.0 and a few more with 14.1. Could I persuade you to check this again with 14.1?