I was trying to install my created extension. First time it worked. After I was trying to install then it shows me the following error.[I am working on windows and Linux platform. But this problem occurred on Linux platform].enter image description here

Error Field: name must be unique. An conflicting entity already exists - id: 96

Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
Field: name must be unique. An conflicting entity already exists - id: 96

  • You'll need to give us a bit more information. This usually happens when you are doing something in the installer without checking if it has already been done. For example, if adding an optionvalue you need to check if it already exists first. Mar 8, 2019 at 10:02
  • I was adding an option group and option value[ I used API in extension ]. I commented that code (It is working on windows but not linux)
    – deepak
    Mar 8, 2019 at 11:42
  • How to debug such a problem?
    – deepak
    Mar 8, 2019 at 12:06

1 Answer 1


To debug this problem, it helps to turn on debugging and backtrace (Administer menu » System Settings » Debugging and Error Handling). This will give more detailed errors. You can also check the log in the ConfigAndLog folder.

It also helps if you can post your code on Github with a link so folks can see problems. In your comments you say that you're using the API to create your records. However, you must also remove those records on uninstall. Using hook_civicrm_managed instead of the API will handle this for you.

To resolve this problem for now, manually delete the records your extension creates, then add an uninstall routine and you should be good.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.