Skip to content

Integrity constraint violation error in Magento 2.1 #5709

Closed
@vipin-eglobeits

Description

@vipin-eglobeits

Steps to reproduce

  1. Install Magento 2.1
  2. Go to admin -> Stores -> Configuration -> Sales -> Google API section
  3. Change the configuration Enable Content Experiments to "Yes"
  4. Save a configurable product and its child product consecutively.

Expected result

  1. We can save the product successfully with any number of times.

Actual result

  1. Product is not saving properly.
  2. Gives an error:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-1383-product' for key 'GOOGLEOPTIMIZER_CODE_STORE_ID_ENTITY_ID_ENTITY_TYPE', query was: UPDATE googleoptimizer_code SET entity_id = ? WHERE (code_id='50')

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions