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

issue deleting product/product categories

Vote:
 

When I try to delete a product category under commerce->categories I get error below.  I can delete the category in commerce manager but the category is still showing under commerce/categories and you can't delete it there.  It does eventually get removed but it takes several minutes.  Has anyone run into this?

cms 11.20.17

commerce 13.33.0.0

/EPiServer/EPiServer.Commerce.Shell/Delete/Delete/:1 
        
        
       Failed to load resource: the server responded with a status of 500 ()
epi.js:2 _317message: "Unable to load /EPiServer/EPiServer.Commerce.Shell/Delete/Delete/ status: 500"response: {url: '/EPiServer/EPiServer.Commerce.Shell/Delete/Delete/', options: TMP, xhr: XMLHttpRequest, status: 500, getHeader: ƒ, …}responseText: "<!DOCTYPE html>\r\n<html>\r\n    <head>\r\n        <title>Value does not fall within the expected range.</title>\r\n        <meta name=\"viewport\" content=\"width=device-width\" />\r\n        <style>\r\n         body {font-family:\"Verdana\";font-weight:normal;font-size: .7em;color:black;} \r\n         p {font-family:\"Verdana\";font-weight:normal;color:black;margin-top: -5px}\r\n         b {font-family:\"Verdana\";font-weight:bold;color:black;margin-top: -5px}\r\n         H1 { font-family:\"Verdana\";font-weight:normal;font-size:18pt;color:red }\r\n         H2 { font-family:\"Verdana\";font-weight:normal;font-size:14pt;color:maroon }\r\n         pre {font-family:\"Consolas\",\"Lucida Console\",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}\r\n         .marker {font-weight: bold; color: black;text-decoration: none;}\r\n         .version {color: gray;}\r\n         .error {margin-bottom: 10px;}\r\n         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:pointer; }\r\n         @media screen and (max-width: 639px) {\r\n          pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }\r\n         }\r\n         @media screen and (max-width: 479px) {\r\n          pre { width: 280px; }\r\n         }\r\n        </style>\r\n    </head>\r\n\r\n    <body bgcolor=\"white\">\r\n\r\n            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>\r\n\r\n            <h2> <i>Value does not fall within the expected range.</i> </h2></span>\r\n\r\n            <font face=\"Arial, Helvetica, Geneva, SunSans-Regular, sans-serif \">\r\n\r\n            <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.\r\n\r\n            <br><br>\r\n\r\n            <b> Exception Details: </b>System.ArgumentException: Value does not fall within the expected range.<br><br>\r\n\r\n            <b>Source Error:</b> <br><br>\r\n\r\n            <table width=100% bgcolor=\"#ffffcc\">\r\n               <tr>\r\n                  <td>\r\n                      <code>\r\n\r\nAn unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.                      </code>\r\n\r\n                  </td>\r\n               </tr>\r\n            </table>\r\n\r\n            <br>\r\n\r\n            <b>Stack Trace:</b> <br><br>\r\n\r\n            <table width=100% bgcolor=\"#ffffcc\">\r\n               <tr>\r\n                  <td>\r\n                      <code><pre>\r\n\r\n[ArgumentException: Value does not fall within the expected range.]\r\n   System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0\r\n   System.Web.Hosting.IIS7WorkerRequest.SetUnknownResponseHeader(String name, String value, Boolean replace) +186\r\n   System.Web.HttpHeaderCollection.SetHeader(String name, String value, Boolean replace) +286\r\n   EPiServer.Commerce.Shell.Controllers.DeleteController.ValidateAntiForgeryToken(HttpContextBase httpContext) +171\r\n   EPiServer.Commerce.Shell.Controllers.DeleteController.Delete(IEnumerable`1 contentReferences) +56\r\n   lambda_method(Closure , ControllerBase , Object[] ) +119\r\n   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35\r\n   System.Web.Mvc.&lt;&gt;c__DisplayClass24_0.&lt;InvokeActionMethodWithFilters&gt;b__0() +80\r\n   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +466\r\n   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +466\r\n   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +970\r\n   System.Web.Mvc.Controller.ExecuteCore() +131\r\n   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +238\r\n   EPiServer.Shell.Web.Mvc.ModuleMvcHandler.ProcessController(IController controller) +52\r\n   EPiServer.Shell.Web.Mvc.ModuleMvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +28\r\n   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +970\r\n   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75\r\n   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +158\r\n</pre>                      </code>\r\n\r\n                  </td>\r\n               </tr>\r\n            </table>\r\n\r\n            <br>\r\n\r\n            <hr width=100% size=1 color=silver>\r\n\r\n            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4667.0\r\n\r\n            </font>\r\n\r\n    </body>\r\n</html>\r\n<!-- \r\n[ArgumentException]: Value does not fall within the expected range.\r\n   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)\r\n   at System.Web.Hosting.IIS7WorkerRequest.SetUnknownResponseHeader(String name, String value, Boolean replace)\r\n   at System.Web.HttpHeaderCollection.SetHeader(String name, String value, Boolean replace)\r\n   at EPiServer.Commerce.Shell.Controllers.DeleteController.ValidateAntiForgeryToken(HttpContextBase httpContext)\r\n   at EPiServer.Commerce.Shell.Controllers.DeleteController.Delete(IEnumerable`1 contentReferences)\r\n   at lambda_method(Closure , ControllerBase , Object[] )\r\n   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)\r\n   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass24_0.<InvokeActionMethodWithFilters>b__0()\r\n   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)\r\n   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)\r\n   at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)\r\n   at System.Web.Mvc.Controller.ExecuteCore()\r\n   at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)\r\n   at EPiServer.Shell.Web.Mvc.ModuleMvcHandler.ProcessController(IController controller)\r\n   at EPiServer.Shell.Web.Mvc.ModuleMvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)\r\n   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()\r\n   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)\r\n   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)\r\n--><!-- \r\nThis error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode=\"Off\"/&gt;. Consider using &lt;customErrors mode=\"On\"/&gt; or &lt;customErrors mode=\"RemoteOnly\"/&gt; in production environments.-->"status: 500xhr: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, …}stack: "Error: Unable to load /EPiServer/EPiServer.Commerce.Shell/Delete/Delete/ status: 500\n    at new _317 (https://www.shoupparts.com/EPiServer/Shell/11.36.12/ClientResources/dojo/dojo.js:15:78148)\n    at _2f1._4f2 [as handleResponse] (https://www.shoupparts.com/EPiServer/Shell/11.36.12/ClientResources/dojo/dojo.js:15:133806)\n    at XMLHttpRequest._4fe (https://www.shoupparts.com/EPiServer/Shell/11.36.12/ClientResources/dojo/dojo.js:15:134085)"[[Prototype]]: Error
_1f9.<computed> @ epi.js:2
load (async)
_4f8 @ dojo.js:15
xhr @ dojo.js:15
dojo.xhr @ dojo.js:15
_sendRequest @ widgets.js:2
(anonymous) @ widgets.js:2
(anonymous) @ dojo.js:15
_2f2 @ dojo.js:15
then._2ff.then @ dojo.js:15
xhr @ widgets.js:2
xhr @ widgets.js:2
_xhr @ widgets.js:2
(anonymous) @ widgets.js:2
(anonymous) @ dojo.js:15
when @ dojo.js:15
xhr @ widgets.js:2
remove @ widgets.js:2
_execute @ widgets.js:2
_b40 @ widgets.js:2
_2f2 @ dojo.js:15
_2ec @ dojo.js:15
resolve @ dojo.js:15
_2f2 @ dojo.js:15
_2ec @ dojo.js:15
resolve @ dojo.js:15
(anonymous) @ widgets.js:2
(anonymous) @ dojo.js:15
_264 @ dojo.js:15
_onConfirm @ widgets.js:2
(anonymous) @ dojo.js:15
(anonymous) @ dojo.js:15
_264 @ dojo.js:15
_onClick @ widgets.js:2
_19e @ dojo.js:15
_onClick @ widgets.js:2
(anonymous) @ dojo.js:15
(anonymous) @ widgets.js:2
#317044
Feb 12, 2024 17:21
Vote:
 

it sounds like a cache problem when you deleted it in CM but it still shows in Catalog UI. Anything in log ?

#317138
Feb 14, 2024 9:45
Vote:
 

Hi Quan

I only see this in the stack trace.  I've created new categories and tried to delete with no success

2024-02-21 13:19:31,632 [376] ERROR EPiServer.Global: Unhandled exception in ASP.NET
System.ArgumentException: Value does not fall within the expected range.
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at System.Web.Hosting.IIS7WorkerRequest.SetUnknownResponseHeader(String name, String value, Boolean replace)
   at System.Web.HttpHeaderCollection.SetHeader(String name, String value, Boolean replace)
   at EPiServer.Commerce.Shell.Controllers.DeleteController.ValidateAntiForgeryToken(HttpContextBase httpContext)
   at EPiServer.Commerce.Shell.Controllers.DeleteController.Delete(IEnumerable`1 contentReferences)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass24_0.<InvokeActionMethodWithFilters>b__0()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
   at System.Web.Mvc.Controller.ExecuteCore()
   at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
   at EPiServer.Shell.Web.Mvc.ModuleMvcHandler.ProcessController(IController controller)
   at EPiServer.Shell.Web.Mvc.ModuleMvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
System.ArgumentException: Value does not fall within the expected range.
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at System.Web.Hosting.IIS7WorkerRequest.SetUnknownResponseHeader(String name, String value, Boolean replace)
   at System.Web.HttpHeaderCollection.SetHeader(String name, String value, Boolean replace)
   at EPiServer.Commerce.Shell.Controllers.DeleteController.ValidateAntiForgeryToken(HttpContextBase httpContext)
   at EPiServer.Commerce.Shell.Controllers.DeleteController.Delete(IEnumerable`1 contentReferences)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass24_0.<InvokeActionMethodWithFilters>b__0()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
   at System.Web.Mvc.Controller.ExecuteCore()
   at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
   at EPiServer.Shell.Web.Mvc.ModuleMvcHandler.ProcessController(IController controller)
   at EPiServer.Shell.Web.Mvc.ModuleMvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
#317471
Edited, Feb 21, 2024 19:26
Vote:
 

As you can see it can't validate the anti forgery token. I'd suggest to clear cookie, or use another browser to try again

#317475
Feb 21, 2024 20:25
Vote:
 

Hi Quan

I've tried doing incognito and other broswers.  What's interesting is maybe 1/3 of the time I can delete the first one, other times I cannot regardless.  If I can delete one category I cannot delete a 2nd one due to that error

#317476
Feb 21, 2024 20:40
Vote:
 

Hi Quan

Tried testing locally, every time I rebuild I can delete the first one, I cannot delete the 2nd one consistentantly.  I've also noticed that the Epirestantiforgerytoken is the same for the first delete request and 2nd.  Is the value supposed to be different for each request?

#317477
Feb 21, 2024 21:23
Vote:
 

yes the token is supposed to have Session lifecycle, meaning it is only changed if you log out/log in, or you close your browser

it could be, however, that your subsequent requests hit different instances than the first. is this locally or against your production site? how many instances do you have? have you tried with ARRAffinity cookie?

Long shot but it's worth checking

#317527
Feb 22, 2024 9:24
Vote:
 

Im having issues locally and on all our instances in azure.  I've tried toggling that cookie to test on dev azure  but that didn't work

#317538
Feb 22, 2024 16:59
Vote:
 

if you can reproduce consistently on local, then you might need to reach out to developer support service. we might need a closer look at your site 

#317539
Feb 22, 2024 17:04
* 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.