1

When I enable or disable an extension I get the error that follows. Enabling or disabling still happens. Advice on resolving this would be gratefully received. This site is running 5.21.2 on Joomla.

> CiviCRM_API3_Exception: "API error: Value already exists in the
> database"
> 
> #0 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm/CRM/Admin/Form/Extensions.php(178):
> civicrm_api3("Extension", "enable", (Array:2))
> #1 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php(479):
> CRM_Admin_Form_Extensions->postProcess()
> #2 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm/CRM/Core/StateMachine.php(144):
> CRM_Core_Form->mainProcess()
> #3 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(45):
> CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Extensions),
> "next", "Next")
> #4 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203):
> CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Extensions),
> "next")
> #5 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103):
> HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Extensions),
> "next")
> #6 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(335):
> HTML_QuickForm_Page->handle("next")
> #7 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm/CRM/Core/Page/Basic.php(395):
> CRM_Core_Controller->run()
> #8 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm/CRM/Core/Page/Basic.php(140):
> CRM_Core_Page_Basic->edit(32, NULL)
> #9 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm/CRM/Admin/Page/Extensions.php(105):
> CRM_Core_Page_Basic->run()
> #10 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(268):
> CRM_Admin_Page_Extensions->run((Array:3), NULL)
> #11 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(68):
> CRM_Core_Invoke::runItem((Array:16))
> #12 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(36):
> CRM_Core_Invoke::_invoke((Array:3))
> #13 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm.php(121):
> CRM_Core_Invoke::invoke((Array:3))
> #14 /var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicrm.php(40):
> civicrm_invoke()
> #15 /var/www/clients/client3/web4/web/libraries/src/Component/ComponentHelper.php(402):
> require_once("/var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicr...")
> #16 /var/www/clients/client3/web4/web/libraries/src/Component/ComponentHelper.php(377):
> Joomla\CMS\Component\ComponentHelper::executeComponent("/var/www/clients/client3/web4/web/administrator/components/com_civicrm/civicr...")
> #17 /var/www/clients/client3/web4/web/libraries/src/Application/AdministratorApplication.php(101):
> Joomla\CMS\Component\ComponentHelper::renderComponent("com_civicrm")
> #18 /var/www/clients/client3/web4/web/libraries/src/Application/AdministratorApplication.php(159):
> Joomla\CMS\Application\AdministratorApplication->dispatch()
> #19 /var/www/clients/client3/web4/web/libraries/src/Application/CMSApplication.php(196):
> Joomla\CMS\Application\AdministratorApplication->doExecute()
> #20 /var/www/clients/client3/web4/web/administrator/index.php(51): Joomla\CMS\Application\CMSApplication->execute()
> #21 {main}  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. API error: Value already exists in the
> database Return to home page.
2
  • Is this a publically available extension? The problem is most likely the extension was not uninstalled cleanly - this could be due to the extension itself not doing the uninstall work required, or there might have been an error during the uninstall process. Feb 2, 2020 at 19:57
  • Yes, these are pretty standard extensions, like Stripe, Mosaico & Fleximailer. I presume the issue is with the civicrm_extension table, but nothing there is obvious enough for me to see a problem.
    – Bryan
    Feb 3, 2020 at 0:03

1 Answer 1

0

Are you using CiviCase and do you have a different language than English for you CiviCRM? If so, you might suffer from a bug that has to do with the relationships for the cases. The easiest fix then is to disable the "standard" case types that are shipped with core?

4
  • That was fixed in 5.20. But worth checking.
    – Demerit
    Feb 3, 2020 at 13:56
  • Cool, that should be fine then....but indeed worth checking :-) Feb 3, 2020 at 14:43
  • No, CiviCase is not enabled, nor is there any language apart form English installed.
    – Bryan
    Feb 3, 2020 at 22:47
  • Then it seems probably like Luke said, except you guessed the extension table but it's probably the civicrm_option_group/civicrm_option_value table.
    – Demerit
    Feb 4, 2020 at 4:05

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.