Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-12249

"System.flush", "Extension.install" don't work with class.api.php

    Details

    • 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

        Attachments

          Activity

            People

            • Assignee:
              xavier xavier dutoit
              Reporter:
              timotten Tim Otten
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: