Answers.Body: <p>I had an identical experience, here's how I fixed it.</p>
  
  <p>Following @Demerit's clue:</p>
  
  <ol>
  <li><p>Using sql: </p>
  
  <p>update civicrm_uf_group set is_reserved = 0 where name = 'volunteer_sign_up'</p></li>
  <li><p>Now remove the profile (previously, you couldn't via the web interface).</p></li>
  </ol>
  
  <p>Re-do the uninstall, it now succeeds.</p>
  
  <p>As per the note in the uninstall.sql file, the uninstall process is trying to use a foreign key to remove the profile indirectly, but it's failing. I suspect that profiles got more complicated and this strategy no longer works? Alternatively, perhaps when an early version of the extension gets installed it's subtly different?</p>
  
  <p>Also note that this is actually the last line of the uninstall, so it mostly does uninstall.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-22T17:22:54.480Z
Answers.LastActivityDate: 2019-11-22T17:22:54.480Z
Answers.UserDisplayName: Alan Dixon
Body: <p>I decided to remove Civivolunteer. Administer > System Settings > Extensions.  I disabled Civivolunteer and then Uninstall.
  Error message: "DB Error: constraint violation"
  The Civivolunteer extension cannot be enabled or uninstalled. What can I do?</p>
  
  <p>Here is a paste of <strong>PART</strong> of the log where the error occurs</p>
  
  <p>Aug 28 15:29:07  [info] $Fatal Error Details = Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => handle
          )</p>
  
  <pre><code>[code] =&gt; -3
  [message] =&gt; DB Error: constraint violation
  [mode] =&gt; 16
  [debug_info] =&gt; DELETE FROM `civicrm_uf_group` WHERE `name` = 'volunteer_sign_up' [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`willycg_civicrm`.`civicrm_uf_join`, CONSTRAINT `FK_civicrm_uf_join_uf_group_id` FOREIGN KEY (`uf_group_id`) REFERENCES `civicrm_uf_group` (`id`))]
  [type] =&gt; DB_Error
  [user_info] =&gt; DELETE FROM `civicrm_uf_group` WHERE `name` = 'volunteer_sign_up' [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`willycg_civicrm`.`civicrm_uf_join`, CONSTRAINT `FK_civicrm_uf_join_uf_group_id` FOREIGN KEY (`uf_group_id`) REFERENCES `civicrm_uf_group` (`id`))]
  [to_string] =&gt; [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="DELETE FROM `civicrm_uf_group` WHERE `name` = 'volunteer_sign_up' [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`willycg_civicrm`.`civicrm_uf_join`, CONSTRAINT `FK_civicrm_uf_join_uf_group_id` FOREIGN KEY (`uf_group_id`) REFERENCES `civicrm_uf_group` (`id`))]"]
  </code></pre>
  
  <p>)</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-29T12:43:35.803Z
Comments.Text: Can you check civicrm logs and paste the error message here?
Comments.UserDisplayName: jitendra - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-29T23:12:30.730Z
Comments.Text: Can you try deleting the volunteer sign up profile (under administer - customize... - profiles - reserved tab) manually first?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-29T23:18:17.437Z
Comments.Text: I have added part of the error log. Should I still delete the volunteer sign up profile and try to uninstall again?
Comments.UserDisplayName: Hock
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-29T23:55:50.903Z
Comments.Text: Yes the log is what made me suggest it because it mentions the profile.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-30T04:55:24.670Z
Comments.Text: It does not give a delete option through the menus. However it does say that it is used for "CiviEvent, CiviEvent_Additional" and no mention of civivolunteer.
Comments.UserDisplayName: Hock
Tags: <civivolunteer>
Title: Cannot uninstall civivolunteeer
ThreadText: # Cannot uninstall civivolunteeer
  
  (Asked by: username_0 on 2019-08-28)
  
  I decided to remove Civivolunteer. Administer > System Settings > Extensions. I disabled Civivolunteer and then Uninstall.
  Error message: "DB Error: constraint violation"
  The Civivolunteer extension cannot be enabled or uninstalled. What can I do?
  
  Here is a paste of **PART** of the log where the error occurs
  
  Aug 28 15:29:07 [info] $Fatal Error Details = Array
  (
  [callback] => Array
  (
  [0] => CRM\_Core\_Error
  [1] => handle
  )
  
  ```
  [code] => -3
  [message] => DB Error: constraint violation
  [mode] => 16
  [debug_info] => DELETE FROM `civicrm_uf_group` WHERE `name` = 'volunteer_sign_up' [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`willycg_civicrm`.`civicrm_uf_join`, CONSTRAINT `FK_civicrm_uf_join_uf_group_id` FOREIGN KEY (`uf_group_id`) REFERENCES `civicrm_uf_group` (`id`))]
  [type] => DB_Error
  [user_info] => DELETE FROM `civicrm_uf_group` WHERE `name` = 'volunteer_sign_up' [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`willycg_civicrm`.`civicrm_uf_join`, CONSTRAINT `FK_civicrm_uf_join_uf_group_id` FOREIGN KEY (`uf_group_id`) REFERENCES `civicrm_uf_group` (`id`))]
  [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="DELETE FROM `civicrm_uf_group` WHERE `name` = 'volunteer_sign_up' [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`willycg_civicrm`.`civicrm_uf_join`, CONSTRAINT `FK_civicrm_uf_join_uf_group_id` FOREIGN KEY (`uf_group_id`) REFERENCES `civicrm_uf_group` (`id`))]"]
  
  ```
  
  )
  
  **Tags:** civivolunteer
  
  > **Comments:**
  > **username_1**: Can you check civicrm logs and paste the error message here?  
  > **username_2**: Can you try deleting the volunteer sign up profile (under administer - customize... - profiles - reserved tab) manually first?  
  > **username_0**: I have added part of the error log. Should I still delete the volunteer sign up profile and try to uninstall again?  
  > **username_2**: Yes the log is what made me suggest it because it mentions the profile.  
  > **username_0**: It does not give a delete option through the menus. However it does say that it is used for "CiviEvent, CiviEvent_Additional" and no mention of civivolunteer.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2019-11-22. Score: 3
  
  I had an identical experience, here's how I fixed it.
  
  Following @username_2's clue:
  
  1. Using sql:
  
     update civicrm\_uf\_group set is\_reserved = 0 where name = 'volunteer\_sign\_up'
  2. Now remove the profile (previously, you couldn't via the web interface).
  
  Re-do the uninstall, it now succeeds.
  
  As per the note in the uninstall.sql file, the uninstall process is trying to use a foreign key to remove the profile indirectly, but it's failing. I suspect that profiles got more complicated and this strategy no longer works? Alternatively, perhaps when an early version of the extension gets installed it's subtly different?
  
  Also note that this is actually the last line of the uninstall, so it mostly does uninstall.
  
  
  ---
  
  