Answers.Body: <p>To debug this problem, it helps to turn on debugging and backtrace (<strong>Administer menu » System Settings » Debugging and Error Handling</strong>).  This will give more detailed errors.  You can also check the log in the <a href="https://civicrm.stackexchange.com/q/15931/12">ConfigAndLog</a> folder.</p>
  
  <p>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 <code>hook_civicrm_managed</code> instead of the API will handle this for you.</p>
  
  <p>To resolve this problem for now, manually delete the records your extension creates, then add an uninstall routine and you should be good.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-08T19:35:12.690Z
Answers.LastActivityDate: 2019-03-08T19:35:12.690Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>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].<a href="https://i.sstatic.net/yEPXe.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yEPXe.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>Error
     Field: <code>name</code> must be unique. An conflicting entity already exists - id: 96</p>
  </blockquote>
  
  <p>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.<br>
  Field: <code>name</code> must be unique. An conflicting entity already exists - id: 96</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-08T10:02:25.267Z
Comments.Text: 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.
Comments.UserDisplayName: Matthew Wire
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-08T11:42:11.747Z
Comments.Text: 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)
Comments.UserDisplayName: deepak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-08T12:06:46.447Z
Comments.Text: How to debug such a problem?
Comments.UserDisplayName: deepak
Tags: <extension>
Title: Getting problem while installing of my extension
ThreadText: # Getting problem while installing of my extension
  
  (Asked by: username_0 on 2019-03-08)
  
  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](https://i.sstatic.net/yEPXe.png)](https://i.sstatic.net/yEPXe.png)
  
  > 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
  
  **Tags:** extension
  
  > **Comments:**
  > **username_1**: 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.  
  > **username_0**: 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)  
  > **username_0**: How to debug such a problem?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-03-08. Score: 2
  
  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](https://civicrm.stackexchange.com/q/15931/12) 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.
  
  
  ---
  
  