3

Drupal 7 Civicrm 4.74

Receiving this error:

API permission check failed for Case/getcount call; insufficient permission: require Array

CiviCRM_API3_Exception: "API permission check failed for Case/getcount call; insufficient permission: require Array"

/var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Case/BAO/Case.php(1914): civicrm_api3("Case", "getcount", (Array:1))
/var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Page/Basic.php(294): CRM_Case_BAO_Case::caseCount(NULL, FALSE)
/var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Page/Basic.php(251): CRM_Core_Page_Basic->action(Object(CRM_Core_BAO_OptionGroup), 10, (Array:7), (Array:4), 1)
/var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Admin/Page/Options.php(232): CRM_Core_Page_Basic->browse()
/var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Page/Basic.php(172): CRM_Admin_Page_Options->browse(NULL, NULL)
/var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Admin/Page/Options.php(224): CRM_Core_Page_Basic->run()
/var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Admin_Page_Options->run((Array:3), NULL)
/var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
/var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
/var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/drupal/civicrm.module(454): CRM_Core_Invoke::invoke((Array:3))
[internal function](): civicrm_invoke("admin", "options")
/var/www/vhosts/example.com/httpdocs/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
/var/www/vhosts/example.com/httpdocs/index.php(21): menu_execute_active_handler()
{main}
 Sorry but we are not able to provide this at the moment.
API permission check failed for Case/getcount call; insufficient permission: require Array
Return to home page.
  • Can you give more info about when you see this? If you turn on debugging/backtrace, do you get more information? – Jon G - Megaphone Tech Mar 25 '16 at 17:37
  • Hm. Comment box is too short for the full debug. - see addition to original question above. – Cullen McGough Mar 25 '16 at 20:45
  • Sorry, I just realized I didn't answer your question. I get this error when clicking on Administer > System Settings > Option Groups – Cullen McGough Mar 28 '16 at 18:47
1

This was a bug in CiviCRM 4.7 which has now been fixed. See https://issues.civicrm.org/jira/browse/CRM-18456

1

OK, I ended up getting into a rabbit hole and spending more time than expected here!

There's a short workaround for you, if you're not trying to edit CiviCase-related option groups: Comment out CRM/Core/Page/Basic.php line 294, which reads:

$caseCount = CRM_Case_BAO_Case::caseCount(NULL, FALSE);   

For the in-depth fix, I've opened a new bug on issues.civicrm.org here.

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.