Needs review
Project:
UC / Civicrm Profile Pane
Version:
6.x-1.0-alpha2
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Mar 2010 at 04:25 UTC
Updated:
7 Feb 2011 at 14:52 UTC
Fresh installs of everything. Using latest CiviCRM version 3.1.3, latest versions of everything else as well.
After installing this module and navigating to it's settings page I get:
Fatal error: Class 'CRM_Core_Permission' not found in PATH-HERE/sites/all/modules/civicrm/CRM/Core/BAO/UFGroup.php on line 267
This was fixed by adding: require_once 'CRM/Core/Permission.php'; to the line 41 as seen below:
function uc_civicrm_profile_pane_admin_settings() {
$form = array();
$options = array();
civicrm_initialize();
require_once 'CRM/Core/Permission.php'; // Right here
require_once('api/v2/UFGroup.php');
$uf_profile = civicrm_uf_profile_groups_get();
I stumbled across this fix via this page: http://forum.civicrm.org/index.php/topic,4312.msg19488.html#msg19488
Comments
Comment #1
millenniumtreeGreat help! Note that there are two other places in the code where this is needed as well.
Basically, before every
require_once('api/v2/UFGroup.php');
there should be a
require_once 'CRM/Core/Permission.php';
Comment #2
millenniumtreeAdded a patch here: http://drupal.org/node/1053698 that fixes this problem.