Page 1 of 1

Get error on creating new category

Posted: Sun Oct 13, 2013 7:08 pm
by ikhlief
Hi,

I am trying to create new category but I get the following error:
Notice: Error: Duplicate entry '0' for key 'PRIMARY'
Error No: 1062
INSERT INTO category SET parent_id = '0', `top` = '1', `column` = '1', sort_order = '0', status = '1', date_modified = NOW(), date_added = NOW() in /home1/jecjo/public_html/jecjordan.com/system/database/mysql.php on line 50

I have a lot of modification and don't know when this start, so I deleted all old files and uploaded new files without modifications to make sure that it's not something from the files and the same problem!!!

Please help my site is closed now because of this.

Thanks

Re: Get error on creating new category

Posted: Mon Oct 14, 2013 2:16 am
by ikhlief
I noticed something. It creats first category normaly but give the category id 0 in phpAdmin. When you create second category it gives him the same id 0 so I got the error!!!!
Please I need help.

Re: Get error on creating new category

Posted: Tue Oct 15, 2013 4:54 am
by ikhlief
Any suggestions please? Thanks for your help but my store is stopped since three days because of this.

Re: Get error on creating new category

Posted: Tue Oct 15, 2013 5:12 am
by Qphoria
Hmm that almost sounds like the category_id field isn't setup as an autoincrement field. This is a fresh 1.5.6 install?

Re: Get error on creating new category

Posted: Tue Oct 15, 2013 5:21 am
by ikhlief
I tried to upgrade to V1.5.6 from 1.5.5.1 but the upgrade didn't completed as I got error, and each time I visit my site it gives me the upgrade steps again, so I decided to cancel upgrade and to go back for my old version, so I installed the old files again and my site worked normally for about one month in front end, but when I tried to create new categories a couple of days ago and tried to take database I started to get these errors!!

Re: Get error on creating new category

Posted: Wed Oct 16, 2013 7:58 pm
by ikhlief
Any suggestions?