Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.0.3
-
Fix Version/s: 3.0.4
-
Component/s: CiviCRM API
-
Labels:None
Description
In Drupal 6.14 while using civicrm_event_get(), I encountered this error:
Fatal error: Class 'CRM_Core_Action' not found in /srv/http/civicrmsite/sites/all/modules/civicrm/CRM/Core/BAO/CustomGroup.php on line 488
Here are the last few lines from XDebug:
9 0.3153 24688324 civicrm_event_get( ) ../my_custom.module:67
10 0.3155 24688392 civicrm_event_search( ) ../Event.php:116
11 0.3311 25905740 CRM_Core_BAO_CustomGroup::getTree( ) ../Event.php:188
I fixed that error by adding:
require_once 'CRM/Core/Action.php';
to line 232 of Core/BAO/CustomGroup.php.
The error now changes to:
Fatal error: Class 'CRM_Utils_String' not found in /srv/http/civicrmsite/sites/all/modules/civicrm/CRM/Core/Action.php on line 245
and the last few lines of XDebug are:
9 0.3061 24688792 civicrm_event_get( ) ../my_custom.module:67
10 0.3063 24688860 civicrm_event_search( ) ../Event.php:116
11 0.3265 25906512 CRM_Core_BAO_CustomGroup::getTree( ) ../Event.php:188
12 0.3537 26520216 CRM_Core_Action::formLink( ) ../CustomGroup.php:503
so I added:
require_once 'CRM/Utils/String.php';
also to line 232 of Core/BAO/CustomGroup.php and now all appears to work as expected. This is of course most probably NOT the correct way to fix the code, but it work anyhow.
My call to civicrm_event_get only generates this error when called with event ids--others work fine.