Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Integrity constraint : remove group in family attributes then recreate it

    Bug Report
    2
    2
    116
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MallauryG last edited by

      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...

      Thanks!

      1 Reply Last reply Reply Quote 0
      • A
        Amitk-Webkul last edited by

        Hi there,

        you have to save it after delete then it will remove from the database.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post