diff --git a/CRM/Volunteer/Page/Angular.php b/CRM/Volunteer/Page/Angular.php index 94740a48..7057813b 100644 --- a/CRM/Volunteer/Page/Angular.php +++ b/CRM/Volunteer/Page/Angular.php @@ -7,6 +7,9 @@ public function run() { 'template' => 'CRM/common/notifications.tpl', )); CRM_Volunteer_Angular::load('/volunteer/manage'); + // Ensure this setting exists even if it's an empty object (https://github.com/civicrm/org.civicrm.volunteer/issues/613) + Civi::resources() + ->addVars('org.civicrm.volunteer', []); parent::run(); } diff --git a/volunteer.php b/volunteer.php index a93e3a81..ce937705 100644 --- a/volunteer.php +++ b/volunteer.php @@ -498,25 +498,6 @@ function _volunteer_isVolListingApiCall($entity, $action) { return (in_array($entity, $entities) && in_array($action, $actions)); } -/** - * Implements hook_civicrm_angularModules(). - * - * @param array $angularModules - * An array containing a list of all Angular modules. - */ -function volunteer_civicrm_angularModules(&$angularModules) { - - // DEPRECATED clientside variable CRM.vars['org.civicrm.volunteer'].currentContactId - // Not used by this extension but kept around in case others depend on it. - // They should be updated to use CRM.config.cid - CRM_Core_Resources::singleton() - ->addVars('org.civicrm.volunteer', array( - 'currentContactId' => CRM_Core_Session::singleton()->getLoggedInContactID() - )); - - return; -} - /** * This is an implementation of hook_civicrm_fieldOptions * It includes `civicrm_volunteer_project` in the whitelist