When enabling the Acquia Agent and Acquia Site Profile Information modules simultaneously, PHP returns a fatal error. The same error is returned when attempting to enable acquia_spi via Drush:

drush @questionnaire.quest.local en acquia_spi --debug
Bootstrap to phase 0. [0.05 sec, 1.33 MB]                            [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.06 sec, 1.46 MB] [bootstrap]
Loading drushrc "/Users/cyates/.drush/drushrc.php" into "home.drush" scope. [0.06 sec, 1.47 MB]              [bootstrap]
Load alias @questionnaire.quest.local [0.06 sec, 1.47 MB]                                                       [notice]
Bootstrap to phase 6. [0.18 sec, 3.91 MB]                                                                    [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.18 sec, 3.91 MB]                                   [bootstrap]
Initialized Drupal 7.9 root directory at /Users/cyates/Sites/questionnaire/docroot [0.24 sec, 4.82 MB]          [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.24 sec, 4.82 MB]                                   [bootstrap]
Initialized Drupal site questionnaire:8082 at sites/default [0.24 sec, 4.82 MB]                                 [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.28 sec, 4.82 MB]                          [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.28 sec, 4.83 MB]                               [bootstrap]
Successfully connected to the Drupal database. [0.28 sec, 4.83 MB]                                           [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.3 sec, 5.28 MB]                                    [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [0.8 sec, 18.61 MB]                                  [bootstrap]
Successfully logged into Drupal as Anonymous (uid=0) [0.81 sec, 18.98 MB]                                    [bootstrap]
Found command: pm-enable (commandfile=pm) [0.82 sec, 18.98 MB]                                               [bootstrap]
Initializing drush commandfile: drush_make [0.82 sec, 18.98 MB]                                              [bootstrap]
Initializing drush commandfile: drush_make_d_o [0.82 sec, 18.98 MB]                                          [bootstrap]
Initializing drush commandfile: user [0.82 sec, 18.98 MB]                                                    [bootstrap]

Fatal error: Call to undefined function acquia_agent_has_credentials() in /Users/cyates/Sites/questionnaire/docroot/sites/all/modules/acquia_connector/acquia_spi/acquia_spi.install on line 24
Drush command terminated abnormally due to an unrecoverable error.                                           [error]
Error: Call to undefined function acquia_agent_has_credentials() in
/Users/cyates/Sites/questionnaire/docroot/sites/all/modules/acquia_connector/acquia_spi/acquia_spi.install,
line 24 [1.87 sec, 21.22 MB]

Enabling acquia_agent first, then enabling acquia_spi installs normally.

Looks like acquia_spi needs to load the appropriate include file from acquia_agent.

Comments

chrisyates’s picture

Priority: Normal » Major
coltrane’s picture

Status: Active » Fixed

Thanks, it's because of core's ordering of module install. 7.x-2.x-dev has moved the call to acquia_agent_has_credentials() till later.

bewhy’s picture

Version: 7.x-2.0 » 6.x-2.x-dev
Status: Fixed » Active

. . not sure if I should be creating a new ticket or modifying this one, so I'm modifying this one

I am getting the same error with Acquia 1.2.39 (Drupal 6.22 core)

There is no 6.22 in the version dropdown so I'm attaching this to 6.2x-dev

coltrane’s picture

Status: Active » Postponed (maintainer needs more info)

@BeWhy how are you enabling Acquia SPI and receiving this message? Is it via drush?

coltrane’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing this. Steps to reproduce will be helpful if this error is still occurring.