After enabling and configuring the module:

Fatal error: Cannot use string offset as an array in .../acquia_connector/acquia_search/Acquia_Search_Service.php on line 46

Beginning at line 46:

$options['headers']['Cookie'] = $cookie;
$options['headers'] += array('User-Agent' => 'acquia_search/'. variable_get('acquia_search_version', '7.x'));
$options['context'] = acquia_agent_stream_context_create($url, 'acquia_search');

The entire function:

    protected function prepareRequest(&$url, &$options, $use_data = TRUE) {
    $id = uniqid();
    if (!stristr($url,'?')) {
      $url .= "?";
    }
    else {
      $url .= "&";
    }
    $url .= 'request_id=' . $id;
    if ($use_data && isset($options['data'])) {
      list($cookie, $nonce) = acquia_search_auth_cookie($url, $options['data']);
    }
    else {
      list($cookie, $nonce) = acquia_search_auth_cookie($url);
    }
    if (empty($cookie)) {
      throw new Exception('Invalid authentication string - subscription keys expired or missing.');
    }
    $options['headers']['Cookie'] = $cookie;
    $options['headers'] += array('User-Agent' => 'acquia_search/'. variable_get('acquia_search_version', '7.x'));
    $options['context'] = acquia_agent_stream_context_create($url, 'acquia_search');
    if (!$options['context']) {
      throw new Exception(t("Could not create stream context"));
    }
    return $nonce;
  }

I've been digging for a few hours now, and haven't been able to figure out what may be causing this on my site. I'm assuming most people aren't seeing this error.

Echoing $cookie with Attachments disabled gives me:
acquia_solr_time=1319146279; acquia_solr_nonce=tLNsaCsKfeY5abxDhijlGs7GxWJa79je; acquia_solr_hmac=f8b3dfde4e7b506e98c730ac712d9b4d367e2765;

With Attachments enabled:
acquia_solr_time=1319146451; acquia_solr_nonce=IfLnZ8lcKqM6Mh6596Q22gLYpcpqQwbe; acquia_solr_hmac=bb6503414f1c0964784935a6f878e01df9bab774;

I see no difference, structurally.

Are there known conflicts with other modules? Any advice on this would be greatly appreciated!

Thanks,

Joe

Comments

jcastelli’s picture

I should also note that I've only begun working with this module. Content is still indexing, and I don't believe this error occurs until the next cron.

randallknutson’s picture

I'm getting this error as well in Acquia_Search_Service.php. Not sure if this should be in this module or the acquia_connector module.

randallknutson’s picture

Project: Apache Solr Attachments » Acquia Connector

Moving to see if this can get some traction.

randallknutson’s picture

Project: Acquia Connector » Apache Solr Attachments
Status: Active » Fixed

Never mind. I found the bug and the fix is already in.

http://drupalcode.org/project/apachesolr_attachments.git/commit/bc604751...

Get the dev branch for fixed version.

Status: Fixed » Closed (fixed)

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

jcastelli’s picture

Sorry Randall, I thought I was subscribed... Months later, I can confirm I ended up taking this route also! Thanks for your responses.

jcastelli’s picture

Issue summary: View changes

Minor formatting changes.