Try our conversational search powered by Generative AI!

Order management does not handle null object when a lineitem is deleted

Found in

EPiServer.Commerce 10.2.2

Fixed in

EPiServer.Commerce 10.4.1

(Or a related package)

Created

Jan 24, 2017

Updated

Mar 10, 2017

State

Closed, Fixed and tested


Description

Steps to reproduce
1. Create an order which contains a line item of some example variation.
2. Add a payment for that order.
3. Delete the example variation.
4. Search the created order from Commerce Manager and try to open it for viewing.
5. An exception is thrown

[ArgumentNullException: The provided content link does not have a value.
Parameter name: contentLink]
EPiServer.Core.Internal.DefaultContentLoader.Get(ContentReference contentLink, LoaderOptions loaderOptions) +502
EPiServer.Commerce.Order.Calculator.DefaultTaxCalculator.TryGetTaxCategoryId(ILineItem item, Int32& taxCategoryId) +101
EPiServer.Commerce.Order.Calculator.DefaultTaxCalculator.CalculateTaxTotal(IOrderForm orderForm, IMarket market, Currency currency) +685