0

Before Posting this question i read all duplicate question which is suggested by stack, un fortunately no previous question helped me.

sql error

What i did

  1. Disable all module one by one ( except the default ones)
  2. Drop database and import backup database
  3. Deleted var folder ( new var folder is created so no permission issues i think still i give 755)

    4.Re-Index is up to date and cache are disabled ,compilation is disabled as well

1

First, you need to check your system.log file from var/log folder in your Magento root directory. See what table it was going to insert and which file executes it.

Also, We had this issue before. This is likely caused by a corrupted database, corrupted SQL indexes in your instance to be precise. You need to re-import your database if you have a backup.

1

I'm not a Magento 1 expert. But the error itself is a MYSQL error.

It means that you have a duplicate within your database with the key 'PRIMARY'. You might want to search in your database within your product table for the column 'PRIMARY' , sort it by 'PRIMARY' (i guess this is like an 'ID' in Magento2 that needs to be unique) and see where you have the 'PRIMARY' with the value '0'.

You might have multiple rows with that key with the value '0'. You will need to delete the ones (or change) that have those until all are unique

If this does not make any sense for you i can help you more if you show me an example of your product database table in Magento 1

1
  • know that the PRIMARY is not the name of the column like i stated before but the primary column of the table which is 'id' – CompactCode Sep 26 '18 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.