Answers.Body: <p>CiviVolunteer is not fully tested for 5.x version and might have compatibility issue like you are facing. This issue has been <a href="https://github.com/civicrm/org.civicrm.volunteer/pull/477/files" rel="nofollow noreferrer">fixed</a> and is probably waiting in PR queue for it to get merged in next release.</p>
  
  <p>You can either download the patch from <a href="https://patch-diff.githubusercontent.com/raw/civicrm/org.civicrm.volunteer/pull/477.patch" rel="nofollow noreferrer">here</a> or wait for next release.</p>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-17T12:31:55.780Z
Answers.Text: This is a great news.Thank you very much Pradeep ;-)
Answers.UserDisplayName: Ichi
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-17T12:52:45.270Z
Answers.Text: So can we mark this answered?
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-17T13:53:44.183Z
Answers.Text: Yes, how to do that ?
Answers.UserDisplayName: Ichi
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-17T14:13:31.820Z
Answers.Text: You simply need to mark an answer as correct (the green check image).
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-17T18:44:44.480Z
Answers.Text: So easy ! I will know now ;-)
Answers.UserDisplayName: Ichi
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-17T09:51:25.503Z
Answers.LastActivityDate: 2018-10-17T09:51:25.503Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>The context is Drupal 7 w/ CiviCRM When a contact/user given in Drupal, want to access Cases (with full Volunteer &amp; Case permissions given), there is an warning :</p>
  
  <pre><code>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).
  </code></pre>
  
  <p>And a bug issue :</p>
  
  <pre><code>$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-&gt;__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-&gt;__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-&gt;_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-&gt;__call("raiseError", (Array:7)) #6 /www-site/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common-&gt;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-&gt;mysqliRaiseError() #8 /www-site/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli-&gt;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-&gt;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-&gt;_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-&gt;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-&gt;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-&gt;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-&gt;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-&gt;getAclClause("a", "CRM_Case_BAO_Case") #21 /www-site/public_html/sites/all/modules/civicrm/api/v3/utils.php(1241): Civi\API\SelectQuery-&gt;__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-&gt;invoke((Array:9)) #25 /www-site/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel-&gt;runRequest((Array:9)) #26 /www-site/public_html/sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel-&gt;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-&gt;invoke((Array:9)) #30 /www-site/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel-&gt;runRequest((Array:9)) #31 /www-site/public_html/sites/all/modules/civicrm/api/api.php(43): Civi\API\Kernel-&gt;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-&gt;preProcess() #36 /www-site/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form-&gt;buildForm() #37 /www-site/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display-&gt;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-&gt;handle(Object(CRM_Case_Form_Search), "display") #39 /www-site/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page-&gt;handle("display") #40 /www-site/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(309): CRM_Core_Controller-&gt;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}
  </code></pre>
  
  <p>There is no trouble for the admin user to access Cases. 
  Where should I look in order to tune the Role permissions ?</p>
  
Tags: <civicase><civivolunteer>
Title: Permission role to access Cases when using Volunteer?
ThreadText: # Permission role to access Cases when using Volunteer?
  
  (Asked by: username_0 on 2018-10-17)
  
  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 ?
  
  **Tags:** civicase, civivolunteer
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-10-17. Score: 3 | Accepted answer
  
  CiviVolunteer is not fully tested for 5.x version and might have compatibility issue like you are facing. This issue has been [fixed](https://github.com/civicrm/org.civicrm.volunteer/pull/477/files) and is probably waiting in PR queue for it to get merged in next release.
  
  You can either download the patch from [here](https://patch-diff.githubusercontent.com/raw/civicrm/org.civicrm.volunteer/pull/477.patch) or wait for next release.
  
  HTH
  
  Pradeep
  
  > **Comments:**
  > **username_0**: This is a great news.Thank you very much Pradeep ;-)  
  > **username_1**: So can we mark this answered?  
  > **username_0**: Yes, how to do that ?  
  > **username_1**: You simply need to mark an answer as correct (the green check image).  
  > **username_0**: So easy ! I will know now ;-)  
  
  ---
  
  