0

I uninstalled civivolunteer. We've opted to instead use an activity type with a couple custom fields tracking role and time spent. Anyway, when uninstalling it did not delete the 2 volunteer and volunteer commendation activity type data but does delete the volunteer custom field data :/

So, we restored the tables:

  • civicrm_custom_group
  • civicrm_custom_field
  • civicrm_option_value
  • civicrm_uf_field
  • civicrm_uf_group
  • civicrm_uf_join

and manually cleaned up what civilvolunteer adds. However, a trigger remains. Each time we upgrade extensions a civivolunteer trigger is trying to run, see error below when upgrading another extension)

Key line:

#2 /var/www/example/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB.php(997): PEAR_Error->__construct("DB Error: no such table", -18, 16, (Array:2), "CREATE TRIGGER civicrm_value_civivolunteer_20_after_insert after insert ON ci...")

Aug 25 09:46:49  [debug] $backTrace = #0 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(942): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/example/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /var/www/example/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB.php(997): PEAR_Error->__construct("DB Error: no such table", -18, 16, (Array:2), "CREATE TRIGGER civicrm_value_civivolunteer_20_after_insert after insert ON ci...")
#3 /var/www/example/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-18, 16, (Array:2), "CREATE TRIGGER civicrm_value_civivolunteer_20_after_insert after insert ON ci...")
#4 /var/www/example/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -18, 16, (Array:2), "CREATE TRIGGER civicrm_value_civivolunteer_20_after_insert after insert ON ci...", "DB_Error", TRUE)
#5 /var/www/example/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB/common.php(1928): PEAR->__call("raiseError", (Array:7))
#6 /var/www/example/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB/mysqli.php(936): DB_common->raiseError(-18, NULL, NULL, "CREATE TRIGGER civicrm_value_civivolunteer_20_after_insert after insert ON ci...", "1146 ** Table 'example_civicrm.civicrm_value_civivolunteer_20' doesn't exist")
#7 /var/www/example/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB/mysqli.php(406): DB_mysqli->mysqliRaiseError()
#8 /var/www/example/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB/common.php(1234): DB_mysqli->simpleQuery("CREATE TRIGGER civicrm_value_civivolunteer_20_after_insert after insert ON ci...")
#9 /var/www/example/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2696): DB_common->query("CREATE TRIGGER civicrm_value_civivolunteer_20_after_insert after insert ON ci...")
#10 /var/www/example/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1829): DB_DataObject->_query("CREATE TRIGGER civicrm_value_civivolunteer_20_after_insert after insert ON ci...")
#11 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(454): DB_DataObject->query("CREATE TRIGGER civicrm_value_civivolunteer_20_after_insert after insert ON ci...")
#12 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1565): CRM_Core_DAO->query("CREATE TRIGGER civicrm_value_civivolunteer_20_after_insert after insert ON ci...", FALSE)
#13 /var/www/example/wp-content/plugins/civicrm/civicrm/Civi/Core/SqlTriggers.php(209): CRM_Core_DAO::executeQuery("CREATE TRIGGER civicrm_value_civivolunteer_20_after_insert after insert ON ci...", (Array:0), TRUE, NULL, FALSE, FALSE)
#14 /var/www/example/wp-content/plugins/civicrm/civicrm/Civi/Core/SqlTriggers.php(155): Civi\Core\SqlTriggers->enqueueQuery("CREATE TRIGGER civicrm_value_civivolunteer_20_after_insert after insert ON ci...")
#15 /var/www/example/wp-content/plugins/civicrm/civicrm/Civi/Core/SqlTriggers.php(54): Civi\Core\SqlTriggers->createTriggers((Array:19), NULL)
#16 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(2335): Civi\Core\SqlTriggers->rebuild(NULL, FALSE)
#17 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(395): CRM_Core_DAO::triggerRebuild()
#18 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Extension/Manager.php(228): CRM_Core_Invoke::rebuildMenuAndCaches(TRUE)
#19 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Extension/Downloader.php(126): CRM_Extension_Manager->replace("/tmp/tmp-SHLdHt//stripe-6.6.1")
#20 /var/www/example/wp-content/plugins/civicrm/civicrm/api/v3/Extension.php(239): CRM_Extension_Downloader->download("com.drastikbydesign.stripe", "https://lab.civicrm.org/extensions/stripe/-/archive/6.6.1/stripe-6.6.1.zip")
#21 /var/www/example/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_extension_download((Array:4))
#22 /var/www/example/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(149): Civi\API\Provider\MagicFunctionProvider->invoke((Array:8))
#23 /var/www/example/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest((Array:8))
#24 /var/www/example/wp-content/plugins/civicrm/civicrm/api/api.php(22): Civi\API\Kernel->runSafe("Extension", "download", (Array:2))
#25 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Extensions.php(190): civicrm_api("Extension", "download", (Array:2))
#26 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(513): CRM_Admin_Form_Extensions->postProcess()
#27 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(144): CRM_Core_Form->mainProcess()
#28 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(43): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Extensions), "next", "Next")
#29 /var/www/example/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Extensions), "next")
#30 /var/www/example/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Extensions), "next")
#31 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(347): HTML_QuickForm_Page->handle("next")
#32 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(395): CRM_Core_Controller->run()
#33 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(140): CRM_Core_Page_Basic->edit(2, NULL)
#34 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(105): CRM_Core_Page_Basic->run()
#35 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Admin_Page_Extensions->run((Array:3), NULL)
#36 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:15))
#37 /var/www/example/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
#38 /var/www/example/wp-content/plugins/civicrm/civicrm.php(1172): CRM_Core_Invoke::invoke((Array:3))
#39 /var/www/example/wp-includes/class-wp-hook.php(292): CiviCRM_For_WordPress->invoke("")
#40 /var/www/example/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters("", (Array:1))
#41 /var/www/example/wp-includes/plugin.php(484): WP_Hook->do_action((Array:1))
#42 /var/www/example/wp-admin/admin.php(259): do_action("toplevel_page_CiviCRM")
#43 {main}

I've tried to run the rebuild database triggers and it did not resolve. Without re-installing and uninstalling and going thru that nightmare again how can we remove this trigger?

3
  • If you select * from civicrm_managed is there still something stuck in there for civivolunteer?
    – Demerit
    Aug 25 at 17:26
  • 1
    Not seeing anything there. We think it is safe to remove from 'civicrm_custom_group' 'CiviVolunteer' which has a table_name of 'civicrm_value_civivolunteer_20' which no longer exists and for which the trigger is trying to reference.
    – Andy Burns
    Aug 25 at 17:37
  • Yes that makes sense to remove.
    – Demerit
    Aug 25 at 17:38
1

I removed the following tables from from 'civicrm_custom_group' table and everything is working as expected:

  • civicrm_value_civivolunteer_...

  • civicrm_value_volunteer_com_...

This was the only remaining civivolunteer trigger reference that we found.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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