Order history page does not load after deleting line item

Found in

EPiServer.Commerce 10.2.0

Fixed in

EPiServer.Commerce 10.4.2

Created

Mar 10 2017

Updated

Mar 17 2017

Area

Core

State

Closed, Fixed and tested


Description

Steps to reproduce:

  1. Log in to the sample site.
  2. Place an order that contains variant A.
  3. Go to Commerce Manager.
  4. Delete the variant A.
  5. Go to the sample site.
  6. View the order history.

Expect: Order history has a message listing the deleted item.
Actual: Page could not load.

 
Page could not be loaded 
The link you specified does not work. This may either be the result of temporary maintenance or an incorrect link. 
Detailed error information (authorized by permissions to functions)
Error occured 3/10/2017 2:46:58 PM 
User IP 172.16.20.199 
User Agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/8.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729) 
Url http://vnlabvm51:2000/en/my-pages/order-history/ 
Referer http://vnlabvm51:2000/en/fashion/mens/mens-shoes/p-44477844/?variationCode=SKU-44477844 
 
Exception details: ArgumentNullException: The provided content link does not have a value. Parameter name: contentLink 
Stack trace:
[ArgumentNullException: The provided content link does not have a value.
Parameter name: contentLink]
   at EPiServer.Core.Internal.DefaultContentLoader.Get[T](ContentReference contentLink, LoaderOptions loaderOptions)
   at EPiServer.Commerce.Order.Calculator.DefaultTaxCalculator.TryGetTaxCategoryId(ILineItem item, Int32& taxCategoryId)
   at EPiServer.Commerce.Order.Calculator.DefaultTaxCalculator.CalculateTaxTotal(IOrderForm orderForm, IMarket market, Currency currency)
   at EPiServer.Commerce.Order.Calculator.DefaultTaxCalculator.GetTaxTotal(IOrderForm orderForm, IMarket market, Currency currency)
   at EPiServer.Commerce.Order.Calculator.DefaultTaxCalculator.<>c__DisplayClass6_0.b__0(IOrderForm form)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.Sum(IEnumerable`1 source)
   at EPiServer.Commerce.Order.Calculator.DefaultTaxCalculator.CalculateTaxTotal(IOrderGroup orderGroup, IMarket market, Currency currency)
   at EPiServer.Commerce.Order.Calculator.DefaultTaxCalculator.GetTaxTotal(IOrderGroup orderGroup, IMarket market, Currency currency)
   at EPiServer.Reference.Commerce.Site.Infrastructure.Business.SiteOrderGroupCalculator.CalculateTotal(IOrderGroup orderGroup) in C:\Episerver\Quicksilver-master (1)\Quicksilver-master\Sources\EPiServer.Reference.Commerce.Site\Infrastructure\Business\SiteOrderGroupCalculator.cs:line 22
   at EPiServer.Commerce.Order.Calculator.DefaultOrderGroupCalculator.GetTotal(IOrderGroup orderGroup)
   at EPiServer.Commerce.Order.IOrderGroupExtensions.GetTotal(IOrderGroup orderGroup)
   at ASP._Page_Views_OrderHistory_Index_cshtml.Execute() in c:\Episerver\Quicksilver-master (1)\Quicksilver-master\Sources\EPiServer.Reference.Commerce.Site\Views\OrderHistory\Index.cshtml:line 29
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
   at System.Web.WebPages.StartPage.ExecutePageHierarchy()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
   at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Note: This bug is related to COM-3805