Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Umbraco 15.2.1 Nested Block List cannot able to save nested block list content. #18379

Closed
svasizeswar opened this issue Feb 19, 2025 · 9 comments

Comments

@svasizeswar
Copy link

svasizeswar commented Feb 19, 2025

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

15.2.1

Bug summary

Accordion BlockList

Image

Accordion BlockList Item

Image

Error on saving

Image

Error Log

System.Text.Json.JsonException: 'C' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: 'C' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo1 jsonTypeInfo) at Umbraco.Cms.Infrastructure.Serialization.SystemTextJsonSerializerBase.Deserialize[T](String input) at Umbraco.Cms.Core.Models.Blocks.BlockEditorDataConverter2.Deserialize(String json)
at Umbraco.Cms.Core.PropertyEditors.BlockValuePropertyValueEditorBase2.CleanupVariantValues(List1 sourceBlockItems, List1 targetBlockItems, Boolean canUpdateInvariantData, HashSet1 allowedCultures)
at Umbraco.Cms.Core.PropertyEditors.BlockValuePropertyValueEditorBase2.MergeVariantInvariantPropertyValueTyped(BlockEditorData2 source, BlockEditorData2 target, Boolean canUpdateInvariantData, HashSet1 allowedCultures)
at Umbraco.Cms.Core.PropertyEditors.BlockValuePropertyValueEditorBase2.MergeVariantInvariantPropertyValue(Object sourceValue, Object targetValue, Boolean canUpdateInvariantData, HashSet1 allowedCultures)
at Umbraco.Cms.Core.PropertyEditors.BlockListPropertyEditor.MergeVariantInvariantPropertyValue(Object sourceValue, Object targetValue, Boolean canUpdateInvariantData, HashSet1 allowedCultures) at Umbraco.Cms.Core.Services.ContentEditingService.EnsureOnlyAllowedFieldsAreUpdated(IContent contentWithPotentialUnallowedChanges, Guid userKey) at Umbraco.Cms.Core.Services.ContentEditingService.UpdateAsync(Guid key, ContentUpdateModel updateModel, Guid userKey) at Umbraco.Cms.Api.Management.Controllers.Document.UpdateDocumentController.<>c__DisplayClass4_0.<<Update>b__0>d.MoveNext() --- End of stack trace from previous location --- at Umbraco.Cms.Api.Management.Controllers.Document.UpdateDocumentControllerBase.HandleRequest(Guid id, UpdateDocumentRequestModel requestModel, Func1 authorizedHandler)
at Umbraco.Cms.Api.Management.Controllers.Document.UpdateDocumentController.Update(CancellationToken cancellationToken, Guid id, UpdateDocumentRequestModel requestModel)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Umbraco.Cms.Web.Common.Middleware.BasicAuthenticationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Umbraco.Cms.Api.Management.Middleware.BackOfficeExternalLoginProviderErrorMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in C:\projects\dotnet\src\MiniProfiler.AspNetCore\MiniProfilerMiddleware.cs:line 112
at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Umbraco.Cms.Web.Common.Middleware.PreviewAuthenticationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestLoggingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)

Image

Specifics

No response

Steps to reproduce

Screen.Recording.2025-02-19.111530.1.mp4

Image

Json Payload

payload.json

Expected result / actual result

Expected result is to save and publish the document without any error

Copy link

Hi there @svasizeswar!

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'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

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 🤖 🙂

@NguyenThuyLan
Copy link
Contributor

Hey @svasizeswar , thank you for reporting, unfortunately, I was not able to reproduce it on a fresh install of v15.2.1. Can you able to reproduce it on a fresh install of v15? Is there anything special on your Home page or the BlockList in Home page?

@NguyenThuyLan NguyenThuyLan added the state/needs-more-info We don't have enough information to give a good reply label Feb 19, 2025
@svasizeswar
Copy link
Author

Hi @NguyenThuyLan

I have done the fresh installation of Umbraco V15.2.1. The issues still exists.
Please check the video for reproducing the issue. After saving and refreshing the nested blocklist with one item. If I add another item to the blocklist. The error appears.

BlockList.mp4

@keyurexemplifi
Copy link

Hi

The problem was related to the "Vary by culture" setting on the page node. When this option is enabled, Umbraco expects culture-specific data, which can sometimes cause issues with saving nested Block List content, especially if the nested items aren't set up to support cultural variations.

Solution:
I navigated to Settings > Document Types > [Your Page Node].
Under Data variations, I disabled the "Vary by culture" toggle.
Saved the changes.

Image

@NguyenThuyLan NguyenThuyLan added state/reproduced affected/v15 and removed state/needs-more-info We don't have enough information to give a good reply labels Feb 21, 2025
@NguyenThuyLan
Copy link
Contributor

You're right @keyurexemplifi , thank you for giving more details. I was able to reproduce it on 15.2.1

@umbracocommunity
Copy link

This issue has been mentioned on Umbraco community forum. There might be relevant details there:

https://forum.umbraco.com/t/block-grid-data-serialization-issue-in-umbraco-backoffice-upgrading-from-15-1-1-to-15-2-2/599/4

@kjac
Copy link
Contributor

kjac commented Mar 5, 2025

This looks like a regression, likely introduced by #17707 in 15.2.

I'm looking at a fix now.

@kjac
Copy link
Contributor

kjac commented Mar 5, 2025

Fixed in #18582 for 15.3

@kjac kjac closed this as completed Mar 5, 2025
@kjac kjac removed their assignment Mar 5, 2025
@umbracocommunity
Copy link

This issue has been mentioned on Umbraco community forum. There might be relevant details there:

https://forum.umbraco.com/t/error-saving-blocklist-content-t-is-an-invalid-start-of-a-value-in-umbraco-15-2-3/1045/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants