-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
affected/v15affected/v16area/backendrelease/16.2.0status/regressionA previously working feature that has broken or changed behavior unexpectedlyA previously working feature that has broken or changed behavior unexpectedlytype/bug
Description
Which Umbraco version are you using?
16.0.0
Bug summary
I have an RTE with a few embedded blocks. If I remove them I cannot save the page - it throws an error that isn't super helpful.
Specifics
Here is the full error message:
[12:08:28 ERR] An unhandled exception has occurred while executing the request.
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
at Umbraco.Cms.Core.PropertyEditors.BlockValuePropertyValueEditorBase`2.<>c__DisplayClass24_0.<RestoreMissingValues>b__0(BlockItemData itemData)
at System.Linq.Enumerable.ListWhereIterator`1.MoveNext()
at Umbraco.Cms.Core.PropertyEditors.BlockValuePropertyValueEditorBase`2.RestoreMissingValues(List`1 sourceBlockItemData, List`1 targetBlockItemData, IEnumerable`1 mergedLayout, Func`3 relevantBlockItemMatcher, Boolean canUpdateInvariantData, HashSet`1 allowedCultures)
at Umbraco.Cms.Core.PropertyEditors.BlockValuePropertyValueEditorBase`2.MergeVariantInvariantPropertyValueTyped(BlockEditorData`2 source, BlockEditorData`2 target, Boolean canUpdateInvariantData, HashSet`1 allowedCultures)
at Umbraco.Cms.Core.PropertyEditors.RichTextPropertyEditor.RichTextPropertyValueEditor.MergeBlockVariantInvariantData(RichTextBlockValue sourceRichTextBlockValue, RichTextBlockValue targetRichTextBlockValue, Boolean canUpdateInvariantData, HashSet`1 allowedCultures)
at Umbraco.Cms.Core.PropertyEditors.RichTextPropertyEditor.RichTextPropertyValueEditor.MergeVariantInvariantPropertyValue(Object sourceValue, Object targetValue, Boolean canUpdateInvariantData, HashSet`1 allowedCultures)
at Umbraco.Cms.Core.PropertyEditors.RichTextPropertyEditor.MergeVariantInvariantPropertyValue(Object sourceValue, Object targetValue, Boolean canUpdateInvariantData, HashSet`1 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, Func`1 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.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>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.<InvokeNextResourceFilter>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.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Umbraco.Cms.Web.Common.Middleware.BasicAuthenticationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>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.<<CreateMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Umbraco.Cloud.Cms.PublicAccess.Middleware.CloudPublicAccessMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Umbraco.Deploy.Infrastructure.Middleware.BearerTokenAuthenticationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>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 Skybrud.Umbraco.Redirects.Middleware.RedirectsMiddleware.InvokeAsync(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.<<CreateMiddleware>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.<<CreateMiddleware>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.<<CreateMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
Steps to reproduce
Not sure how we ended at this data. I can see the property has this saved in the db currently:
{
"markup": "\u003Cp\u003EDownload Terms and Conditions\u003C/p\u003E\u003Cp\u003ETerms \u0026amp; Conditions packaging (English)\u0026nbsp;\u003C/p\u003E\u003Cumb-rte-block data-content-key=\u0022a87d4f58-f3f6-4a76-a163-935cbfbb1329\u0022\u003E\u003C/umb-rte-block\u003E\u003Cumb-rte-block data-content-key=\u0022e21a63c9-8a33-4464-ae6d-8807f878867b\u0022\u003E\u003C/umb-rte-block\u003E\u003Cp\u003E\u003C/p\u003E",
"blocks": {
"contentData": [
{
"contentTypeKey": "4ff20808-2b12-4496-8eaa-9bb88a0ea6e0",
"udi": null,
"key": "a87d4f58-f3f6-4a76-a163-935cbfbb1329",
"values": [
{
"editorAlias": "Umbraco.MultiUrlPicker",
"culture": null,
"segment": null,
"alias": "link",
"value": "[{\u0022name\u0022:\u0022DOWNLOAD\u0022,\u0022target\u0022:null,\u0022udi\u0022:\u0022umb://media/ef3343d1cd2b40478d768cbb64becb3e\u0022,\u0022url\u0022:null,\u0022queryString\u0022:null}]"
},
{
"editorAlias": "Umbraco.ColorPicker",
"culture": null,
"segment": null,
"alias": "color",
"value": "{\r\n \u0022label\u0022: \u0022Red\u0022,\r\n \u0022value\u0022: \u0022#b5191e\u0022\r\n}"
}
]
},
{
"contentTypeKey": "4ff20808-2b12-4496-8eaa-9bb88a0ea6e0",
"udi": null,
"key": "e21a63c9-8a33-4464-ae6d-8807f878867b",
"values": []
}
],
"settingsData": [],
"expose": [
{
"contentKey": "a87d4f58-f3f6-4a76-a163-935cbfbb1329",
"culture": null,
"segment": null
},
{
"contentKey": "e21a63c9-8a33-4464-ae6d-8807f878867b",
"culture": null,
"segment": null
}
],
"Layout": {
"Umbraco.RichText": [
{
"contentUdi": null,
"settingsUdi": null,
"contentKey": "a87d4f58-f3f6-4a76-a163-935cbfbb1329",
"settingsKey": null
},
{
"contentUdi": null,
"settingsUdi": null,
"contentKey": "e21a63c9-8a33-4464-ae6d-8807f878867b",
"settingsKey": null
}
]
}
}
}Multiple languages are enabled on the site, but this property is not variant.
Expected result / actual result
I'd expect it to save the new value.
This item has been added to our backlog AB#54815
Metadata
Metadata
Assignees
Labels
affected/v15affected/v16area/backendrelease/16.2.0status/regressionA previously working feature that has broken or changed behavior unexpectedlyA previously working feature that has broken or changed behavior unexpectedlytype/bug
