Related to #1490396: Please rename solrphpclient to SolrPhpClient: If Libraries module is not enabled (such as during the Drupal installation process) and a distribution correctly places a library in the profiles/[profile-name]/libraries directory, search_api_solr's hook_requirements check will fail.

The attached patch simply adds the profile's libraries directory to the list of places to scan for the Php Solr library.

Comments

ezra-g’s picture

Title: hook_requirements() check fails when installing with non-default installation profile » _search_api_solr_solrphpclient_path() fails when installing with non-default installation profile
pirog’s picture

i can confirm that this correctly searches profile/*/libraries for SolrPhpClient during the drupal installation process.

brandenlhamilton’s picture

I can confirm that applying this patch helped resolve a problem when installing the Panopoly profile. There is a related issue in that projects queue that may depend on this patch.

http://drupal.org/node/1490396#comment-5873648

acrollet’s picture

StatusFileSize
new605 bytes

I tried this patch, but it had the disadvantage of not working with drush site-install. Updated patch attached, works with drush and the regular installer.

jsacksick’s picture

There's a function for that :


function drupal_get_profile() {
  global $install_state;

  if (isset($install_state['parameters']['profile'])) {
    $profile = $install_state['parameters']['profile'];
  }
  else {
    $profile = variable_get('install_profile', 'standard');
  }

  return $profile;
}

jsacksick’s picture

Status: Needs review » Fixed

Committed with the drupal_get_profile() use, thanks.

Status: Fixed » Closed (fixed)

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