veda-consulting-company / uk.co.vedaconsulting.gdpr

Other
11 stars 55 forks source link

Problems Using and I cannot Uninstall - Is there a way to manually uninstall? #314

Closed themak1985 closed 1 year ago

themak1985 commented 1 year ago

I am trying to find a way to fully uninstall this extension without breaking my site. I cannot do it via gui because of the following issues.

When enabled, I cannot access any contacts, this is what I get in the logs

[error] $Fatal Error Details = array:3 [ "message" => "DB Error: no such field" "code" => null "exception" => CRM_Core_Exception {#9697 -errorData: array:6 [ "error_code" => "no such field" "sql" => """ SELECT a.id asid, a.subject assubject, a.activity_date_time asactivity_date_time, a_to_civicrm_value_data_policy_acceptance_2.terms_conditions_2 ascustom_2\n FROM civicrm_activity a\n LEFT JOINcivicrm_value_data_policy_acceptance_2`a_to_civicrm_value_data_policy_acceptance_2 ON a_to_civicrm_value_data_policy_acceptance_2.entity_id = a.id\n WHERE (a.id IN (SELECT activity_id FROM civicrm_activity_contact WHERE record_type_id = 3 AND contact_id = "563")) AND (a.activity_type_id = "55")\n ORDER BY a.activity_date_time DESC\n LIMIT 1\n OFFSET 0\n [nativecode=1054 Unknown column 'a_to_civicrm_value_data_policy_acceptance_2.terms_conditions_2' in 'field list'] """ "tip" => "add debug=1 to your API call to have more info about the error" "is_error" => 1 "error_message" => "DB Error: no such field" "debug_information" => """ SELECT a.id as id, a.subject as subject, a.activity_date_time as activity_date_time, a_to_civicrm_value_data_policy_acceptance_2.terms_conditions_2 as custom_2\n FROM civicrm_activity a\n LEFT JOIN civicrm_value_data_policy_acceptance_2 a_to_civicrm_value_data_policy_acceptance_2 ON a_to_civicrm_value_data_policy_acceptance_2.entity_id = a.id\n WHERE (a.id IN (SELECT activity_id FROM civicrm_activity_contact WHERE record_type_id = 3 AND contact_id = "563")) AND (a.activity_type_id = "55")\n ORDER BY a.activity_date_time DESC\n LIMIT 1\n OFFSET 0\n [nativecode=1054 Unknown column 'a_to_civicrm_value_data_policy_acceptance_2.terms_conditions_2' in 'field list'] """ ]

cause: null

-_trace: null
#message: "DB Error: no such field"
#code: 0
#file: "/home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/api/api.php"
#line: 135
trace: {
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/api/api.php:135 {
    › if (is_array($result) && !empty($result['is_error'])) {
    ›   throw new CiviCRM_API3_Exception($result['error_message'], CRM_Utils_Array::value('error_code', $result, 'undefined'), $result);
    › }
  }
  /home/prinyc/www/www/wp-content/uploads/civicrm/ext/uk.co.vedaconsulting.gdpr/CRM/Gdpr/SLA/Utils.php:113 { …}
  /home/prinyc/www/www/wp-content/uploads/civicrm/ext/uk.co.vedaconsulting.gdpr/gdpr.php:614 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/Hook.php:271 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/Hook/WordPress.php:136 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/Civi/Core/CiviEventDispatcher.php:248 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:264 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:239 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:73 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/Civi/Core/CiviEventDispatcher.php:209 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/Hook.php:167 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/Hook.php:942 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Page.php:205 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Contact/Page/View/Summary.php:86 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:319 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm.php:1199 { …}
  /home/prinyc/www/www/wp-includes/class-wp-hook.php:307 { …}
  /home/prinyc/www/www/wp-includes/class-wp-hook.php:331 { …}
  /home/prinyc/www/www/wp-includes/plugin.php:476 { …}
  /home/prinyc/www/www/wp-admin/admin.php:259 { …}
}

} ] `

When I try to uninstall i get this error in the log:

[error] $Fatal Error Details = array:3 [ "message" => "DB Error: not found" "code" => null "exception" => CRM_Core_Exception {#12402 -errorData: array:6 [ "error_code" => "not found" "sql" => " ALTER TABLE civicrm_value_data_policy_acceptance_2 DROP COLUMNterms_conditions_2[nativecode=1091 ** Can't DROP 'terms_conditions_2'; check that column/key exists]" "tip" => "add debug=1 to your API call to have more info about the error" "is_error" => 1 "error_message" => "DB Error: not found" "debug_information" => " ALTER TABLE civicrm_value_data_policy_acceptance_2 DROP COLUMNterms_conditions_2` [nativecode=1091 ** Can't DROP 'terms_conditions_2'; check that column/key exists]" ]

cause: null

-_trace: null
#message: "DB Error: not found"
#code: 0
#file: "/home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/api/api.php"
#line: 135
trace: {
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/api/api.php:135 {
    › if (is_array($result) && !empty($result['is_error'])) {
    ›   throw new CiviCRM_API3_Exception($result['error_message'], CRM_Utils_Array::value('error_code', $result, 'undefined'), $result);
    › }
  }
  /home/prinyc/www/www/wp-content/uploads/civicrm/ext/uk.co.vedaconsulting.gdpr/CRM/Gdpr/Upgrader.php:88 { …}
  /home/prinyc/www/www/wp-content/uploads/civicrm/ext/uk.co.vedaconsulting.gdpr/CRM/Gdpr/Upgrader/Base.php:354 { …}
  /home/prinyc/www/www/wp-content/uploads/civicrm/ext/uk.co.vedaconsulting.gdpr/gdpr.civix.php:157 { …}
  /home/prinyc/www/www/wp-content/uploads/civicrm/ext/uk.co.vedaconsulting.gdpr/gdpr.php:80 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Extension/Manager/Module.php:61 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Extension/Manager/Module.php:75 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Extension/Manager.php:456 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Extensions.php:177 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:573 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php:144 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php:43 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:355 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php:334 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php:140 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php:105 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:319 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
  /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm.php:1199 { …}
  /home/prinyc/www/www/wp-includes/class-wp-hook.php:307 { …}
  /home/prinyc/www/www/wp-includes/class-wp-hook.php:331 { …}
  /home/prinyc/www/www/wp-includes/plugin.php:476 { …}
  /home/prinyc/www/www/wp-admin/admin.php:259 { …}
}

} ] `

themak1985 commented 1 year ago

I manually removed custom fields and manually deleted an option via phpmyadmin and I was able to uninstall without issue via gui. Thanks!