[Concurrent editing] ContentNotFoundException when editor publishes a deleted content

Found in

EPiServer.CMS.UI 11.13.1

Fixed in

EPiServer.CMS.UI 11.16.0

Created

Nov 29 2018

Updated

Jan 28 2019

Area

CMS UI

State

Closed, Fixed and tested


Description

Steps to reproduce:
1. User1 edits Page1 in Edit View.
2. User2 moves Page1 to Trash.
3. User2 clicks to empty Trash.
4. User1 clicks Publish menu item on Page1.

Expected:
User1 sees a user-friendly warning that the CMS is unable to load the current content.

Actual: User1 sees a server error.

[ContentNotFoundException: Content with id 89_133 was not found]
   EPiServer.Core.Internal.DefaultContentLoader.Get(ContentReference contentLink, LoaderOptions loaderOptions) +530
   EPiServer.Cms.Shell.UI.Rest.ContentChangeManager.Commit(ContentReference contentReference, SaveAction action) +86
   EPiServer.Cms.Shell.UI.Rest.Internal.ContentDataStore.ChangeStatus(ContentReference id, SaveAction action) +36
   lambda_method(Closure , ControllerBase , Object[] ) +194
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +229
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +70
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +72
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +387
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +387
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +38
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +188
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   EPiServer.Shell.Services.Rest.RestControllerBase.EndExecute(IAsyncResult asyncResult) +60
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +602
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +128