Try our conversational search powered by Generative AI!

System.InvalidOperationException when setting personalization for Visitor group typed Product in cart or wishlist

Found in

EPiServer.Commerce 10.7.3

Fixed in

EPiServer.Commerce 11.1.0

(Or a related package)

Created

Jul 05, 2017

Updated

Aug 14, 2017

State

Closed, Fixed and tested


Description

Steps to reproduce:
1. Go to CMS > Visitor group.
2. Create a new one typed Product in a cart or a wishlist.
3. Go to CMS > Edit.
4. Select Start page then set personalized for main body.
5. Click the View mode icon.

Observed: Error with SerializedCarts mode is enabled

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 7/5/2017 3:06:35 PM
User IP 172.16.20.167
User Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0
Url http://vnlabvm14:2100/en/
Referer http://vnlabvm14:2100/episerver/Cms/

The SerializedCarts mode is enabled in ecf.app.config. Either disable it or use the new order APIs instead. Refer to https://world.episerver.com/documentation/developer-guides/commerce/orders/serializable-carts/ for more information.
Description: 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.

Exception Details: System.InvalidOperationException: The SerializedCarts mode is enabled in ecf.app.config. Either disable it or use the new order APIs instead. Refer to https://world.episerver.com/documentation/developer-guides/commerce/orders/serializable-carts/ for more information.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[InvalidOperationException: The SerializedCarts mode is enabled in ecf.app.config. Either disable it or use the new order APIs instead. Refer to https://world.episerver.com/documentation/developer-guides/commerce/orders/serializable-carts/ for more information.]
Mediachase.Commerce.Website.Helpers.CartHelper.ValidateSerializedCartsMode() +132
Mediachase.Commerce.Website.Helpers.CartHelper.LoadCart(String name, Guid userId) +25
Mediachase.Commerce.Website.Helpers.CartHelper..ctor(String name, Guid userId) +57
EPiServer.Business.Commerce.VisitorGroupsCriteria.ProductInCartOrWishListCriterion.IsMatchBySearchFunc(Guid userGuid, Func`2 searchFunc) +72
EPiServer.Business.Commerce.VisitorGroupsCriteria.ProductInCartOrWishListCriterion.IsMatchProductCode(Guid userGuid, String productName) +98
EPiServer.Business.Commerce.VisitorGroupsCriteria.ProductInCartOrWishListCriterion.IsMatch(IPrincipal principal, HttpContextBase httpContext) +217
EPiServer.Personalization.VisitorGroups.VisitorGroupRole.IsMatchWithAllCriteria(IPrincipal principal, HttpContextBase httpContext) +183
EPiServer.Personalization.VisitorGroups.VisitorGroupRole.IsMatchInternal(IPrincipal principal, HttpContextBase httpContext) +50
EPiServer.Personalization.VisitorGroups.VisitorGroupRole.IsMatchCached(IPrincipal principal, HttpContextBase httpContext) +396
EPiServer.Personalization.VisitorGroups.VisitorGroupRole.IsMatch(IPrincipal principal, HttpContextBase httpContext) +309
EPiServer.Security.Internal.VisitorGroupSecurityDescriptor.HasAccess(IPrincipal principal, AccessLevel access) +215
EPiServer.Core.Html.StringParsing.StringFragmentCollection.AddFilteredFragment(String contentGroup, List`1 filteredFragments, IStringFragment fragment, ISecurable securable, IPrincipal principal) +69
EPiServer.Core.Html.StringParsing.StringFragmentCollection.GetFilteredFragments(IPrincipal principal) +450
EPiServer.Web.Mvc.Html.XhtmlStringExtensions.RenderXhtmlStringToWriter(HtmlHelper htmlHelper, XhtmlString xhtmlString, UrlResolver urlResolver, IContentLoader contentLoader, TextWriter writer) +87
EPiServer.Web.Mvc.Html.XhtmlStringExtensions.RenderXhtmlString(HtmlHelper htmlHelper, XhtmlString xhtmlString) +48
ASP.util_views_shared_displaytemplates_xhtmlstring_ascx._Render_control1(HtmlTextWriter __w, Control parameterContainer) in C:\EPiServer\EPiServer.Reference.Commerce-11.0.0-pre-002545\Sources\EPiServer.Reference.Commerce.Site\util\Views\Shared\DisplayTemplates\XhtmlString.ascx:4
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +263
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +160
System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +76
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8921

!!!Note : The " Product in cart or wishlist " visitor group has spelling mistake "Product from a specifed category" >> it must be "Product from a specified category" screenshot-1