umbraco / Umbraco.Commerce.Issues

18 stars 2 forks source link

[v12-rc1] Order details fails with NullReferenceException #421

Closed arknu closed 1 year ago

arknu commented 1 year ago

Describe the bug This is an install updated from Vendr, if that matters.

I'm getting a NullReferenceException when attempting to view order details:

 at Umbraco.Commerce.Cms.Web.Controllers.UmbracoCommerceOrderControllerBase.DoGetConfig(Guid storeId, String entityType, String viewType, Func`3 createEvent)
at Umbraco.Commerce.Cms.Web.Controllers.UmbracoCommerceOrderControllerBase.DoGetOrderEditorConfig(Guid storeId)
 at lambda_method1532(Closure, Object, Object[])
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.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)\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)"
}

Steps To Reproduce Open the orders list and click on an order to view details

Expected behavior The order details view should appear

Screenshots

image

Umbraco Commerce version: 12.0.0-rc1

mattbrailsford commented 1 year ago

Just to be clear, this is after you've run through this migration guide and completed all of the steps (including deleting certain directories etc) https://docs.umbraco.com/umbraco-commerce/how-to-guides/migrate-from-vendr-to-umbraco-commerce ?

arknu commented 1 year ago

@mattbrailsford Yes, I have completely deleted App_Plugins\Vendr. I did have a custom order editor view, but I have removed that to troubleshoot the issue. Thanks to Visual Studio decompiling the source (sorry), I think it has something to do with the OrderEditorConfig property on the Store being null. But that's about as much as I can tell.

arknu commented 1 year ago

@mattbrailsford Following on from that, I can confirm that the [orderEditorConfig] column in the umbracoCommerceStore table was NULL. Setting this to any string (I used "TEST") solves the problem. Is this setting even exposed in the UI?

Again, my install is an upgrade, so maybe new installs set this to a non-null value by default?

mattbrailsford commented 1 year ago

Thanks for confirming. This is a legacy property only used in Vendr so we can probably remove it entirely in Umbraco Commerce as the file based convention is the preferred method.

mattbrailsford commented 1 year ago

This was fixed in 12.0.0 release