We are getting this error when going into a section in uCommerce, the other sections seem to work fine.
Server Error in '/' Application.
Sequence contains more than one matching element
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: Sequence contains more than one matching element
Source Error:
An 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.
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
From umbracoLog table:
At /umbraco/ucommerce/catalog/editcategory.aspx?id=115 (Referred by: http://www.website.com/umbraco/umbraco.aspx): System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at UCommerce.EntitiesV2.Product.GetPrice(PriceGroup priceGroup)
at UCommerce.Catalog.PricingService.GetProductPrice(Product product, PriceGroup priceGroup)
at UCommerce.Catalog.PricingService.GetProductPrice(Product product, ProductCatalog catalog)
at UCommerceWeb.Umbraco.UCommerce.Catalog.EditCategoryProducts.<>c__DisplayClass1.<DataBind>b__0(Product product)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource)
at System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e)
at System.Web.UI.WebControls.Repeater.DataBind()
at UCommerceWeb.Umbraco.UCommerce.Catalog.EditCategoryProducts.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at UCommerce.Presentation.Web.Umbraco.TabViewBuilder.BuildTabView(TabView tabView, IView view, Boolean databindTabView, ImageClickEventHandler saveMethod, ImageClickEventHandler deleteMethod)
at UCommerceWeb.Umbraco.UCommerce.Catalog.EditCategory.InitializeTabView(TabView tabView)
at UCommerceWeb.Umbraco.UCommerce.MasterPages.UmbracoTabView.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Sequence contains more than one matching element
Hi,
We are getting this error when going into a section in uCommerce, the other sections seem to work fine.
From umbracoLog table:
Any ideas?
Thanks
Chris
Turns out the customer had *somehow* managed to get two entries in the PriceGroupPrice table and this duplication was causing the error.
Thanks Soren for your help.
Chris
Thanks, Chris, for following up here. Much appreciated!
is working on a reply...