Problem/Motivation
There is a method populateAcquiaSettings() of a class AcquiaSubsription to which we come from acquia_search_init() function. This method populates the settings from various sources. If the variable table is already populated, it uses those credentials instead of Acquia cloud. If local credentials don't exist, it attempts to set with Acquia cloud:
public function populateAcquiaSettings() {
// Attempt to set local credentials first.
$this->setLocalCredentials();
// If local credentials don't exist, attempt to set with Acquia cloud.
if (!$this->settings) {
$this->setAcquiaCloudCredentials();
}
}
The problem is that setLocalCredentials() method, which runs first, always fills $this->settings property. In case local credentials are not set, $this->settings will contain AcquiaSettings object instance with empty properties:
if (!$identifier || !$key || !$application_uuid) {
$this->settings = new AcquiaSettings();
return;
}
Due to this fact the if (!$this->settings) condition will not work and setAcquiaCloudCredentials() method will never run.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3330332-2.patch | 496 bytes | mglaman |
Issue fork acquia_connector-3330332
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mglamanWhile we sort out the other permission issues, this should sort out local overrides and fix the condition.
Comment #4
renat33 commentedHello,
I've checked the issue with the fix. Works as expected.
Thanks
Comment #5
japerry