Edit ViewWishlist.aspx Gives SQL Server Error

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
flattmatt
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 25
Joined: Mon May 25, 2009 4:02 pm

Edit ViewWishlist.aspx Gives SQL Server Error

Post by flattmatt » Wed Jul 01, 2009 2:00 am

Searched forever, can't find this problem/solution
I try to view somebody's wishlist via ViewWishlist.aspx
All fine, except my header, footer, leftnav, etc are all screwed up to default.
If I choose the "Edit" dropdown on the page to change the layout (from "view"), It crashes with this error:

Code: Select all

Server Error in '/' Application.
Item has already been added. Key in dictionary: 'WishlistItemId'  Key being added: 'WishlistItemId'
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.ArgumentException: Item has already been added. Key in dictionary: 'WishlistItemId'  Key being added: 'WishlistItemId'

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.

Stack Trace:

[ArgumentException: Item has already been added. Key in dictionary: 'WishlistItemId'  Key being added: 'WishlistItemId']
   System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +2904181
   System.Collections.Hashtable.Add(Object key, Object value) +11
   System.Collections.Specialized.OrderedDictionary.Add(Object key, Object value) +49
   System.Web.UI.WebControls.DataKey.LoadViewState(Object state) +88
   System.Web.UI.WebControls.DataKey.System.Web.UI.IStateManager.LoadViewState(Object state) +4
   System.Web.UI.WebControls.GridView.LoadDataKeysState(Object state) +310
   System.Web.UI.WebControls.GridView.LoadControlState(Object savedState) +450
   System.Web.UI.Control.LoadControlStateInternal(Object savedStateObj) +118
   System.Web.UI.Page.LoadAllState() +212
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1092
Anybody else seen this? I don't see how I could be the only one....
Thanks in advance

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Edit ViewWishlist.aspx Gives SQL Server Error

Post by mazhar » Wed Jul 01, 2009 6:29 am

What is your application version? You can found this information under Administration -> Help -> About AbleCommerce

flattmatt
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 25
Joined: Mon May 25, 2009 4:02 pm

Re: Edit ViewWishlist.aspx Gives SQL Server Error

Post by flattmatt » Tue Jul 07, 2009 11:35 am

Heres all the information:

PLATFORM: ASP.NET
VERSION: 7.0.3
BUILD: 12458
MSSQL v2000
AC SCHEMA v2000

AjaxControlToolkit: 1.0.20229.20821
CommerceBuilder: 7.3.12065.0
CommerceBuilder.AbleCommerceTax: 7.3.12396.0
CommerceBuilder.AcTestProvider: 1.0.0.0
CommerceBuilder.AustraliaPost: 7.1.0.0
CommerceBuilder.AuthorizeNet: 7.0.9764.0
CommerceBuilder.BankOfCanada: 7.3.0.0
CommerceBuilder.CanadaPost: 7.0.0.0
CommerceBuilder.Configuration: 7.3.12065.0
CommerceBuilder.CyberSource: 7.0.9310.0
CommerceBuilder.Data: 7.3.12065.0
CommerceBuilder.DataClient.Api: 7.0.3.1
CommerceBuilder.DataClient.Csv: 7.0.34.0
CommerceBuilder.DHLInternational: 7.2.11307.0
CommerceBuilder.ECB: 7.0.0.0
CommerceBuilder.FedEx: 7.0.9725.0
CommerceBuilder.GoogleCheckout: 7.0.10052.0
CommerceBuilder.InternetSecure: 7.0.9764.0
CommerceBuilder.LinkPoint: 7.0.9764.0
CommerceBuilder.Paradata: 7.0.9764.0
CommerceBuilder.PayFlowPro: 7.0.10061.0
CommerceBuilder.PayJunction: 7.2.11284.0
CommerceBuilder.PayPal: 7.3.12238.0
CommerceBuilder.Protx: 7.3.12327.0
CommerceBuilder.Services: 7.3.12065.0
CommerceBuilder.SkipJack: 7.0.9764.0
CommerceBuilder.UPS: 7.0.10041.0
CommerceBuilder.USPS: 7.0.9728.0
CommerceBuilder.Web: 7.3.12065.0
ComponentArt.Web.UI: 2008.2.1267.3
CyberSource.Base: 2.0.0.0
CyberSource.Clients: 5.0.2.0
CyberSource.Clients.XmlSerializers: 5.0.2.0
CyberSource.WSSecurity: 2.0.0.0
CybsWSSecurityIOP: 1.0.0.0
edtFTPnet: 1.2.4.0
FredCK.FCKeditorV2: 2.5.2912.21007
ICSharpCode.SharpZipLib: 0.85.5.452
LinkPointTransaction: 1.0.1797.29766
log4net: 1.2.10.0
Microsoft.Practices.EnterpriseLibrary.Common: 2.0.0.0
Microsoft.Practices.EnterpriseLibrary.Data: 2.0.0.0
Microsoft.Practices.ObjectBuilder: 1.0.51205.0
Microsoft.Web.Preview: 1.2.61025.0
NVelocity: 7.2.0.0
PaygatewayNET: 3.0.0.0
paypal_base: 4.2.1.0
PFProCOMLib: 1.0.0.0
PFProdotNET: 0.0.0.0
Validators: 1.0.0.0
WebChart: 1.1.1.6
wwHoverPanel: 1.85.0.0

ThinkNoodle
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 33
Joined: Fri Oct 10, 2008 7:14 am
Location: UK

Re: Edit ViewWishlist.aspx Gives SQL Server Error

Post by ThinkNoodle » Thu Aug 06, 2009 9:25 am

I have the same error...

be interested to know the solution

Matt

ZLA
Commodore (COMO)
Commodore (COMO)
Posts: 496
Joined: Fri Mar 13, 2009 2:55 pm

Re: Edit ViewWishlist.aspx Gives SQL Server Error

Post by ZLA » Thu Aug 06, 2009 10:52 am

This is probably due to redundant data. I had this problem with ac_ProductTemplateFields when I did some updates via sql. See this post for an explanation: viewtopic.php?f=42&t=11885
I reported the error in this post but never updated it with what I found: viewtopic.php?f=42&t=11881

If you look into the wishlist tables, I suspect you or AC will find that one or more of them have an artificial (non-natural) primary key but really should have a composite primary key on two or more other columns in the table. Look at the foreign key columns and try doing a count of records by them. A count > 1 would probably generate the error.

Removing the duplicate data should fix the problem.

HTH.

User avatar
napacabs
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 45
Joined: Mon Jan 14, 2008 2:58 pm
Location: Chino, California
Contact:

Re: Edit ViewWishlist.aspx Gives SQL Server Error

Post by napacabs » Tue May 18, 2010 12:10 pm

Any other solution, if no redundant data found:

VERSION: 7.0.3
BUILD: 12458
MSSQL v2005
AC SCHEMA v2005

Error at ViewWishlist.aspx?WishlistId=

Item has already been added. Key in dictionary: 'WishlistItemId'  Key being added: 'WishlistItemId'
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.ArgumentException: Item has already been added. Key in dictionary: 'WishlistItemId'  Key being added: 'WishlistItemId'

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.

Stack Trace:

[ArgumentException: Item has already been added. Key in dictionary: 'WishlistItemId' Key being added: 'WishlistItemId']
System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +2866787
System.Collections.Hashtable.Add(Object key, Object value) +11
System.Collections.Specialized.OrderedDictionary.Add(Object key, Object value) +49
System.Web.UI.WebControls.DataKey.LoadViewState(Object state) +88
System.Web.UI.WebControls.DataKey.System.Web.UI.IStateManager.LoadViewState(Object state) +4
System.Web.UI.WebControls.GridView.LoadDataKeysState(Object state) +310
System.Web.UI.WebControls.GridView.LoadControlState(Object savedState) +450
System.Web.UI.Control.LoadControlStateInternal(Object savedStateObj) +118
System.Web.UI.Page.LoadAllState() +212
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1092


Version Information: Microsoft .NET Framework Version:2.0.50727.1873; ASP.NET Version:2.0.50727.1433

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Edit ViewWishlist.aspx Gives SQL Server Error

Post by mazhar » Fri May 21, 2010 11:32 am

Is this happens when there is some special product in wishlist or it happens for any product in wishlist? If this is some special case then can you explain what type of product must be in wishlist to produce this.

User avatar
napacabs
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 45
Joined: Mon Jan 14, 2008 2:58 pm
Location: Chino, California
Contact:

Re: Edit ViewWishlist.aspx Gives SQL Server Error

Post by napacabs » Sun May 23, 2010 6:47 pm

This happens with every product. It's a simple product with no "Bundle", no "Options and Variants", and no custom product fields.

Thanks for replying.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Edit ViewWishlist.aspx Gives SQL Server Error

Post by mazhar » Mon May 24, 2010 7:30 am

I tried to reproduce it on same build of 7.0.3 means VERSION: 7.0.3 BUILD: 12458 but was unable to reproduce the case. I am able to open viewwishlist page in edit mode having some items in it.

User avatar
napacabs
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 45
Joined: Mon Jan 14, 2008 2:58 pm
Location: Chino, California
Contact:

Re: Edit ViewWishlist.aspx Gives SQL Server Error

Post by napacabs » Mon May 24, 2010 11:37 am

From ViewWishlist.aspx, were you able to add wish items to cart? That's when I get the error.

Post Reply