Closed stefanolsen closed 3 years ago
Same issue with customer in the field below. I can search for a customer. Auto-suggest will find it and show an empty-text option. Selecting a market and a customer from the empty-options and then clicking "Create Order" closes the modal box and throws these exceptions in the console.
TypeError: Cannot read property 'trim' of undefined
at t.value (1.chunk.js:1)
at t.value (1.chunk.js:1)
at Fo (vendor~main.chunk.js:1)
at Ro (vendor~main.chunk.js:1)
at Ul (vendor~main.chunk.js:1)
at Ur (vendor~main.chunk.js:1)
at Sr (vendor~main.chunk.js:1)
at lr (vendor~main.chunk.js:1)
at vendor~main.chunk.js:1
at e.unstable_runWithPriority (vendor~main.chunk.js:1)
Uncaught TypeError: Cannot read property 'trim' of undefined
at t.value (1.chunk.js:1)
at t.value (1.chunk.js:1)
at Fo (vendor~main.chunk.js:1)
at Ro (vendor~main.chunk.js:1)
at Ul (vendor~main.chunk.js:1)
at Ur (vendor~main.chunk.js:1)
at Sr (vendor~main.chunk.js:1)
at lr (vendor~main.chunk.js:1)
at vendor~main.chunk.js:1
at e.unstable_runWithPriority (vendor~main.chunk.js:1)
Thanks for reporting I have created an issue in our internal tracking system.
We are unable to recreate this issue
This is locally. In DXP the same page crashes even before this (opening a separate issue for that).
Trying it out with React Debugger in Chrome, I see that the markets property has correct market items.
But in the immediate child node, those markets have been transformed to an options property, which has undefined labels and values.
Let me know if you need further information.
Turns out that adding the following lines in Startup.cs fixes the error:
services.Configure<JsonOptions>(o =>
{
o.JsonSerializerOptions.PropertyNamingPolicy = null;
});
But since this is a global setting, it also affect custom code where we might want to use the default camel-case naming. Is it possible for Episerver to apply the setting internally (in areas where needed)?
I have verified the issue and reported an issue in our internal tracking system
this should be fixed in latest packages
Which version is this fixed in?
Fixed in EPiServer.Commerce.Core.14.0.0-inte-021024
From the Commerce Order Management view, I click "Create Order". I have created three markets, but when opening the "Choose Market" dropdown box, I see three options with empty markets (see attachment).
Build: