Post by CanadaPleco » Wed Sep 21, 2011 9:07 am

I have never run into this error before, until today. I moved my site to a live URL, modified the config file and changed the settings in the admin to reflect the new domain. Everything else seems to be working find except I cannot add a new product. Every way I try I get the following error:

Code: Select all

Error: Duplicate entry '0-0' for key 1
Error No: 1062
INSERT INTO product_to_store SET product_id = '0', store_id = '0'

New member

Posts

Joined
Sat Aug 20, 2011 1:06 am

Post by CanadaPleco » Fri Sep 23, 2011 5:10 am

No ideas?

This only is happening for adding new products or updating them. No other part of the admin. I've uploaded the original files and still nothing (even tho I have not changed any admin files) other then config to the appropriate settings.

New member

Posts

Joined
Sat Aug 20, 2011 1:06 am

Post by uksitebuilder » Fri Sep 23, 2011 5:14 am

product_id = 0 just doesn't seem right

have you modified the admin/model/catalog/product.php ?

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by CanadaPleco » Sat Sep 24, 2011 2:43 am

I didn't think I did, I re-uploaded that file and am now getting this error on copying a product.

Code: Select all

Error: Duplicate entry '602-1' for key 1
Error No: 1062
INSERT INTO product_description SET product_id = '602', language_id = '1', name = 'A Hairy List Notepad', meta_keyword = '', meta_description = '', description = '<p>\r\n Need to leave a "moosage" in your neck of the woods? Our new magnetic notepads will keep your family posted! Each pad is backed with a strong magnetic strip and comes with 50 sheets of easy-to-tear paper featuring popular Lazy One designs! pads are shrink wrapped with a hook attached. Size: Each sheet is 11" x 4.25"</p>\r\n'
Inserting a new product

Code: Select all

Error: Duplicate entry '603-1' for key 1
Error No: 1062
INSERT INTO product_description SET product_id = '603', language_id = '1', name = 'ab', meta_keyword = '', meta_description = '', description = ''

New member

Posts

Joined
Sat Aug 20, 2011 1:06 am

Post by CanadaPleco » Sat Sep 24, 2011 2:59 am

Went thru and cleaned up the DB manually in phpmyadmin and its working... what a pain.

New member

Posts

Joined
Sat Aug 20, 2011 1:06 am

Post by reyan123 » Sat Feb 09, 2013 3:31 pm

i got the following error while adding product into my website


Notice: Error: Duplicate entry '346-0' for key 1
Error No: 1062
INSERT INTO product_to_store SET product_id = '346', store_id = '0' in /home/fundaina/public_html/system/database/mysql.php on line 49

help me to solve this issue .

Newbie

Posts

Joined
Mon Jun 18, 2012 11:56 pm

Post by reyan123 » Sat Feb 09, 2013 4:07 pm

CRE Loaded was giving me the error 1062 – Duplicate entry ’2147483647′ for key 1 – when trying to add a new product.

Cause: for some unexplained reason the auto_increment ID field on Table “products” has gone up to 2147483647 which is apparently the maximum number of rows permitted in an INT column.

Fix:

Go to your phpMyadmin interface
Backup your database (make sure you know how to restore it if needed)
Browse the products table (select to sort the fields by Descending order)
The top item should now have the ID = 2147483647
Change the ID to a number up from the previous item (e.g.: Previous was ID = 301, than change the ID = 2147483647 to 302)
Repeat same process with table “product_to_categories”
Return to table “products”
Select the SQL tab
run the following SQL Query : ALTER TABLE products AUTO_INCREMENT=303 (note that 303 is the next number up from the example on step 5, you should use the next number up in your situation)

It worked perfectly for me, hope this helps.

Newbie

Posts

Joined
Mon Jun 18, 2012 11:56 pm

Post by fvapparel » Fri Oct 05, 2018 2:57 am

@reyan123

Thank you for posting your solution...it worked for me!! Much obliged.

Newbie

Posts

Joined
Mon Aug 25, 2014 1:56 pm
Who is online

Users browsing this forum: Amazon [Bot] and 119 guests