Hello,

I upgraded our site to D6.x and UC2.x and also Wishlist 1.1, and ever since we get errors similar to this when adding any product to a Wishlist:

user warning: Duplicate entry '0' for key 1 query: INSERT INTO uc_wishlist_products (wid, nid, qty, changed, data, purchase) VALUES (253, 596, 1, 1300983598, 'a:2:{s:10:\"attributes\";a:1:{i:5;s:2:\"11\";}s:9:\"shippable\";s:1:\"1\";}', '') in /home/<user>/public_html/sites/all/modules/ubercart/uc_wishlist/uc_wishlist.module on line 667.

I have no idea how to fix this. Any ideas? I was gonna try uninstall/fresh install but figured I would report this first in case there is a quick fix, and to help anyone else who has the same problem.

Thanks
Mike

Comments

BigMike’s picture

I am still trying to figure this out. Can anyone offer any help? I am gonna try to get this solved & will report back if I figure it out-

Mike

BigMike’s picture

Status: Active » Fixed

Ok

That actually wasn't so bad really. I followed advice from this post: http://drupal.org/node/614648#comment-4396968

In uc_wishlist.module, I changed the "INSERT INTO" on line 667 to be "REPLACE INTO" and the problem went away and my Wishlist is working once again.

NOICE.

Mike

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.