PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '80' for key 'PRIMARY': INSERT INTO {uc_products} (vid, nid, model, list_price, cost, sell_price, weight, weight_units, length, width, height, length_units, pkg_qty, default_qty, unique_hash, ordering, shippable) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14, :db_insert_placeholder_15, :db_insert_placeholder_16); Array ( [:db_insert_placeholder_0] => 80 [:db_insert_placeholder_1] => 80 [:db_insert_placeholder_2] => F2550-0001 [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => 0 [:db_insert_placeholder_7] => lb [:db_insert_placeholder_8] => 21 [:db_insert_placeholder_9] => 6 [:db_insert_placeholder_10] => 6 [:db_insert_placeholder_11] => in [:db_insert_placeholder_12] => 1 [:db_insert_placeholder_13] => 1 [:db_insert_placeholder_14] => ad144b8457be1e919120072f851f9c0b [:db_insert_placeholder_15] => 0 [:db_insert_placeholder_16] => 1 ) in drupal_write_record() (line 685

It just recently begin doing this, Please help

CommentFileSizeAuthor
#2 node 80.PNG38.07 KBStealth

Comments

longwave’s picture

Somehow you already have a product record with node ID 80, but the corresponding node 80 doesn't actually exist, and Drupal is trying to reuse that node ID. Have you manually deleted any nodes or products from your database?

Stealth’s picture

StatusFileSize
new38.07 KB

I finally created the new product node id 83, but it took about 4 attempts... this has happened to the last 5 products I have added, very time consuming to add a product. I have not manually deleted any products from my database

Note * thier is already a node id 80

Click on attachment

longwave’s picture

What about in the node table? All nids that exist in uc_products should also exist in node.

Stealth’s picture

their is no nid 80 in the node table but their is one in uc_products.. Could you please explain how to fix this problem, do I delete nid 80 from uc_ products or do I add this nid 80 to the node table?

Stealth’s picture

I think the problem is corrected, It seems to be working ok so far. Thank you for all your help.

longwave’s picture

Status: Active » Fixed
Stealth’s picture

Status: Fixed » Closed (fixed)

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