Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.0
-
Fix Version/s: Unscheduled
-
Component/s: CiviCRM API, Extension System
-
Labels:None
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
The API includes some operations for manipulating CiviCRM configuration, e.g. "System.flush", "Extension.install", etc. These operations require inspecting some data from the CMS (e.g. getting a list of active CMS modules for reconciliation in CRM_Core_ManagedEntities).
However, when using class.api.php, the CMS isn't bootstrapped, so CMS operations fail.
Possible fixes:
- Modify class.api.php, etal, to bootstrap the CMS (as well as Civi).
- Modify CRM_Utils_System_* to support on-demand bootstrap. (Comparison: Various functions in civicrm.module call civicrm_initialize() to ensure that CiviCRM is bootstrapped. Similarly, various functions in CRM_Utils_System_Drupal could call a helper to ensure that Drupal is bootstrapped.)
See also: https://github.com/totten/civix/issues/9