November Happy Hour will be moved to Thursday December 5th.

Order Management not working - mainfest loaded as stylesheet & data.map not a function

Vote:
 

On latest Customised Commerce the Order Management screen does not load correctly as I think the manifest isn't loaded (Latest Chrome, Firefox etc)

1. Error in console (firefox only)

The stylesheet https://www.example.com/EPiServer/EPiServer.Commerce.UI.CustomerService/14.19.0.0/clientResources/build/manifest.json was not loaded because its MIME type, "application/json", is not "text/css". 

This can be verified by looking at the html source : view-source:https://www.example.com/EPiServer/Commerce/OrderManagement

<link href="/EPiServer/EPiServer.Commerce.UI.CustomerService/14.19.0.0/clientResources/build/manifest.json" rel="stylesheet" />

2. The following error also occurs in the browser (Latest Chrome, Firefox etc)

Chrome:
main.js:1 Uncaught (in promise) TypeError: t.sent(...).data.map is not a function
    at t.<anonymous> (main.js:1:11925)
    at main.js:1:11404
    at Object.next (main.js:1:11509)
    at i (main.js:1:10246)

Firefox:
Uncaught (in promise) TypeError: t.sent().data.map is not a function
    p https://www.example.com/EPiServer/EPiServer.Commerce.UI.CustomerService/14.19.0.0/clientResources/build/static/js/main.js:1
   

#319529
Edited, Mar 26, 2024 11:28
Vote:
 

Hi Jacob

I see the same for point one. Safari strict mode rejects loading that file. But the page loads anyway. You could post a support case, as it is not right.

For point two it often turns out to be that an REST API returns an unexpected response. I would probably set a breakpoint on that method and see what is returned versus what was expected.

#319696
Mar 29, 2024 15:43
Vote:
 

I managed to look into point 2 some more, it is the below API request that failed due to access restrictions (no idea why an internal Opti API URL isn't behind /episerver/ like it should be but it is what it is)

/csr/api/countries

This URL also returns a 500, which isn't great

/csr/api/carts?startingIndex=0&numberOfRecords=50&status=Any&createdFrom=&createdTo=&siteId=Any

{
    "message": "Object reference not set to an instance of an object.",
    "messageDetail": "Object reference not set to an instance of an object.",
    "statusCode": 500
}

#320011
Apr 04, 2024 15:30
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.