There seems to be some missing error handling, potentially causing customer-facing Javascript issues after selecting a shipping method in checkout and before "next" reacts.
The browser just freezes and the user can not check out with any shipping method.
Disabling the module dhl/module-ui worked around that issue but also removes the admin ui for creating DHL parcels.
Aparently settings() returns not an object but a string
"An error has happened during application run. See exception log for details."
and the code requires the returned valued to be a string.
It should check the type or handle the exception to at least allow the checkout with any shipping method, even if the DHL UI to select a parcel station can not be shown.
FYI:
It was called by the following code because there was a non-existing theme configured for the 404 and cookies pages. The cause has been fixed but the error handling should still be performed in the outlined place as any error there breaks the entire checkout process not only for DHL but for all other shipping services too. (low probability but critical impact)
shippingService.isLoading(true);
request.post(
serviceUrl,
JSON.stringify(payload)
).success(
function (response) {
storage.set(countryId + postalCode, response);
checkoutData.set(response); <<<<<<<<<< response="An error has happened during application run. See exception log for details."
shippingService.isLoading(false);
}
)
We introduced a type check in Netresearch_ShippingUi version 2.0.2 (used in DHL Shipping v2). There are no plans to backport the change to this repository.
There seems to be some missing error handling, potentially causing customer-facing Javascript issues after selecting a shipping method in checkout and before "next" reacts. The browser just freezes and the user can not check out with any shipping method. Disabling the module dhl/module-ui worked around that issue but also removes the admin ui for creating DHL parcels.
The Exception happened in this line: https://github.com/netresearch/dhl-module-ui/blob/master/view/base/web/js/model/shipping-settings.js#L131
Aparently settings() returns not an object but a string "An error has happened during application run. See exception log for details." and the code requires the returned valued to be a string. It should check the type or handle the exception to at least allow the checkout with any shipping method, even if the DHL UI to select a parcel station can not be shown.
FYI: It was called by the following code because there was a non-existing theme configured for the 404 and cookies pages. The cause has been fixed but the error handling should still be performed in the outlined place as any error there breaks the entire checkout process not only for DHL but for all other shipping services too. (low probability but critical impact)