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.

CommentFileSizeAuthor
#2 3330332-2.patch496 bytesmglaman
Command icon 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

yurikulinkovich created an issue. See original summary.

mglaman’s picture

Status: Active » Needs review
StatusFileSize
new496 bytes

While we sort out the other permission issues, this should sort out local overrides and fix the condition.

alena_stanul made their first commit to this issue’s fork.

renat33’s picture

Hello,

I've checked the issue with the fix. Works as expected.

Thanks

japerry’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.