Torbz Posted August 16, 2010 Share Posted August 16, 2010 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 More sharing options...
Torbz Posted August 17, 2010 Author Share Posted August 17, 2010 Bump! Anyone from the dev team able to shed light on this? Link to comment Share on other sites More sharing options...
rocky Posted August 18, 2010 Share Posted August 18, 2010 I have no idea what would cause it. The only solution would be to log in to phpMyAdmin and search tables starting with ps_attribute for rows with ID 335 and delete them. Link to comment Share on other sites More sharing options...
Torbz Posted November 6, 2010 Author Share Posted November 6, 2010 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 More sharing options...
tomerg3 Posted November 6, 2010 Share Posted November 6, 2010 Now that I know of it, a fix is in the works, a new version will be released soon, which will set all the auto-increment value correctly, without having to re-import. Link to comment Share on other sites More sharing options...
J.Sahu Posted August 21, 2013 Share Posted August 21, 2013 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. ps_attribute ps_attribute_group ps_attribute_group_lang ps_attribute_group_shop ps_attribute_impact ps_attribute_lang ps_attribute_shop Hope this will work for you. Link to comment Share on other sites More sharing options...
J.Sahu Posted January 25, 2021 Share Posted January 25, 2021 This solution was for old prestashop method i am not sure it will work on new. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now