Jump to content

(SOLVED) an error occurred while creating object attribute (Duplicate entry '335-1' for key 1)


Recommended Posts

An error occurred while creating object attribute (Duplicate entry '335-1' for key 1)

Having problems when creating attributes for a newly created group.

I'm assuming this error message has something to do with an attempt to write to the database that is being scuppered by an already existing entry.

Does anyone have any ideas as to why this might be happening and how to solve the problem?

I have the skills to look up the entry in the database and fiddle, but I don't immediately know to what the quoted number refers nor what is meant by key 1.

Link to comment
Share on other sites

  • 2 months later...

Sussed out what it was - I used a migration script from Tomer to move an OSCommerce catalogue across into PS - which largely worked, except it screwed up the auto-increment in the ps_attribute_lang and ps_attribute tables, so I've raised the last entry to a higher number than anything else existing in the the DB and it creates new groups and attributes without kicking out this error.

So it was the migration script at fault.

Link to comment
Share on other sites

  • 2 years later...

This problem occurs if you have not correctly added the attribute and try to add the combinations.

It's very simple to solve if you haven't added many attributes.

First deselect the auto increment of "id_attribute" field in the "ps_attribute" table then you can delete all values of below tables and again select the auto increment of "id_attribute" table.

Hope this will work for you.

Link to comment
Share on other sites

  • 7 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...