Recent Topics

Integrity constraint : remove group in family attributes then recreate it

  • Hello, I recently had this bug while editing an attribute family.

    How to reproduce :

    1. Edit an existing family
    2. Remove a group
    3. Create again a group with the same name (for instance : if you have deleted the wrong group and you want to recreate it)
    4. Save

    Behavior :

    SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate field '1-Group' for the key 'attribute_groups_attribute_family_id_name_unique'

    Expecting behavior :

    I think you should verify if the record exists in the database before creating it. It is not a big deal for a programmer who will understand this error. But the end user may be confused.

    + This bug may exists in differents contexts...


Log in to reply