1

The context is Drupal 7 w/ CiviCRM When a contact/user given in Drupal, want to access Cases (with full Volunteer & Case permissions given), there is an warning :

Warning: Declaration of CRM_Volunteer_Permission::check($permissions) should be compatible with CRM_Core_Permission::check($permissions, $contactId = NULL) in require_once() (line 218 of /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/ClassLoader.php).

And a bug issue :

$backTrace = #0 /www-site/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(948): CRM_Core_Error::backtrace("backTrace", TRUE) #1 /www-site/public_html/sites/all/modules/civicrm/packages/PEAR.php(921): CRM_Core_Error::exceptionHandler(Object(DB_Error)) #2 /www-site/public_html/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "\nINSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation )\nS...") #3 /www-site/public_html/sites/all/modules/civicrm/packages/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "\nINSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation )\nS...") #4 /www-site/public_html/sites/all/modules/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "\nINSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation )\nS...", "DB_Error", TRUE) #5 /www-site/public_html/sites/all/modules/civicrm/packages/DB/common.php(1907): PEAR->__call("raiseError", (Array:7)) #6 /www-site/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-1, NULL, NULL, "\nINSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation )\nS...", "1213 ** Deadlock found when trying to get lock; try restarting transaction") #7 /www-site/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError() #8 /www-site/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("\nINSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation )\nS...") #9 /www-site/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2415): DB_common->query("\nINSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation )\nS...") #10 /www-site/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("\nINSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation )\nS...") #11 /www-site/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(438): DB_DataObject->query("\nINSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation )\nS...") #12 /www-site/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(1411): CRM_Core_DAO->query("\nINSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation )\nS...", TRUE) #13 /www-site/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Contact/Permission.php(250): CRM_Core_DAO::executeQuery("\nINSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation )\nS...") #14 /www-site/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Contact/Permission.php(320): CRM_Contact_BAO_Contact_Permission::cache(3) #15 /www-site/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php(3576): CRM_Contact_BAO_Contact_Permission::cacheSubquery() #16 /www-site/public_html/sites/all/modules/civicrm/CRM/Utils/SQL.php(48): CRM_Contact_BAO_Contact->addSelectWhereClause() #17 /www-site/public_html/sites/all/modules/civicrm/CRM/Case/BAO/Case.php(3229): CRM_Utils_SQL::mergeSubquery("Contact") #18 /www-site/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(2713): CRM_Case_BAO_Case->addSelectWhereClause() #19 /www-site/public_html/sites/all/modules/civicrm/Civi/API/SelectQuery.php(390): CRM_Core_DAO::getSelectWhereClause("a") #20 /www-site/public_html/sites/all/modules/civicrm/Civi/API/SelectQuery.php(111): Civi\API\SelectQuery->getAclClause("a", "CRM_Case_BAO_Case") #21 /www-site/public_html/sites/all/modules/civicrm/api/v3/utils.php(1241): Civi\API\SelectQuery->__construct("Case", TRUE) #22 /www-site/public_html/sites/all/modules/civicrm/api/v3/Case.php(359): _civicrm_api3_basic_get("CRM_Case_BAO_Case", (Array:4), TRUE, "Case", Object(CRM_Utils_SQL_Select)) #23 /www-site/public_html/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_case_get((Array:3)) #24 /www-site/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9)) #25 /www-site/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:9)) #26 /www-site/public_html/sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("Case", "get", (Array:3), NULL) #27 /www-site/public_html/sites/all/modules/civicrm/api/v3/Generic.php(296): civicrm_api("Case", "get", (Array:3)) #28 /www-site/public_html/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(86): civicrm_api3_generic_getcount((Array:9)) #29 /www-site/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9)) #30 /www-site/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:9)) #31 /www-site/public_html/sites/all/modules/civicrm/api/api.php(43): Civi\API\Kernel->runSafe("Case", "getcount", (Array:2)) #32 /www-site/public_html/sites/all/modules/civicrm/CRM/Case/BAO/Case.php(1957): civicrm_api3("Case", "getcount", (Array:2)) #33 /www-site/public_html/sites/all/modules/civicrm/CRM/Case/BAO/Case.php(2975): CRM_Case_BAO_Case::caseCount(NULL, FALSE) #34 /www-site/public_html/sites/all/modules/civicrm/CRM/Case/Form/Search.php(77): CRM_Case_BAO_Case::isCaseConfigured() #35 /www-site/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(585): CRM_Case_Form_Search->preProcess() #36 /www-site/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm() #37 /www-site/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Case_Form_Search), "display") #38 /www-site/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Case_Form_Search), "display") #39 /www-site/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display") #40 /www-site/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(309): CRM_Core_Controller->run((Array:3), NULL) #41 /www-site/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:14)) #42 /www-site/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3)) #43 /www-site/public_html/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:3)) #44 /www-site/public_html/includes/menu.inc(527): civicrm_invoke("case", "search") #45 /www-site/public_html/index.php(21): menu_execute_active_handler() #46 {main}

There is no trouble for the admin user to access Cases. Where should I look in order to tune the Role permissions ?

4

CiviVolunteer is not fully tested for 5.x version and might have compatibility issue like you are facing. This issue has been fixed and is probably waiting in PR queue for it to get merged in next release.

You can either download the patch from here or wait for next release.

HTH

Pradeep

  • This is a great news.Thank you very much Pradeep ;-) – Ichi Oct 17 '18 at 12:31
  • So can we mark this answered? – Pradeep Nayak Oct 17 '18 at 12:52
  • Yes, how to do that ? – Ichi Oct 17 '18 at 13:53
  • You simply need to mark an answer as correct (the green check image). – Pradeep Nayak Oct 17 '18 at 14:13
  • So easy ! I will know now ;-) – Ichi Oct 17 '18 at 18:44

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.