Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension reinstallation fails when CiviCRM Logging is enabled #58

Open
chumkui opened this issue Nov 16, 2018 · 0 comments
Open

Extension reinstallation fails when CiviCRM Logging is enabled #58

chumkui opened this issue Nov 16, 2018 · 0 comments
Assignees
Milestone

Comments

@chumkui
Copy link

chumkui commented Nov 16, 2018

The extension fails to reinstall (i.e. it was previously installed and then disabled and uninstalled) if CiviCRM logging is enabled. I am using version 5.7, but this does not seem to matter, any recent version of Civi exhibits the same behaviour. These are the steps to reproduce from a fresh install:

  1. From a completely fresh install turn logging on (i.e. civicrm/admin/setting/misc?reset=1)
  2. download/clone the outlook.api extension into the ext directory
  3. install the extension (this all works fine)
  4. disable the extension and then uninstall the extension (use the GUI, or Drush)
  5. Verify the extension is uninstalled and then press the install button again - you will get the following error code:

DB Error: unknown error

I did some debugging and the failure occurs on a DB query. It is very easy to reproduce, but I created a set of WatchDog log entries to trace it, here is the failure:

`

  $Fatal Error Details = Array ( [callback] => Array ( [0] => CRM_Core_Error [1] => exceptionHandler ) [code] => -1 [message] => DB Error: unknown error [mode] => 16 [debug_info] => ALTER TABLE civicrm.log_civicrm_value_outlook_group_settings_11 ADD sync_to_outlook_15 varchar(255) COLLATE utf8_unicode_ci DEFAULT '' [nativecode=1060 ** Duplicate column name 'sync_to_outlook_15'] [type] => DB_Error [user_info] => ALTER TABLE civicrm.log_civicrm_value_outlook_group_settings_11 ADD sync_to_outlook_15 varchar(255) COLLATE utf8_unicode_ci DEFAULT '' [nativecode=1060 ** Duplicate column name 'sync_to_outlook_15'] [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="ALTER TABLE civicrm.log_civicrm_value_outlook_group_settings_11 ADD sync_to_outlook_15 varchar(255) COLLATE utf8_unicode_ci DEFAULT '' [nativecode=1060 ** Duplicate column name 'sync_to_outlook_15']"] )

`
The extension will uninstall and reinstall without error if logging is not enabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants