Closed (fixed)
Project:
Apache Solr Multilingual
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2013 at 10:45 UTC
Updated:
2 Apr 2013 at 13:10 UTC
getContext() is not a function of class "", which gets called here:
/**
* Implements hook_apachesolr_modify_query().
*/
function apachesolr_multilingual_apachesolr_query_alter($query) {
global $language;
$context = $query->getContext();
$environment = apachesolr_multilingual_environment_load($context['env_id']);
...
}
This causes all search pages to break. The hook is invoked before executing a search query. As suggested in apachesolr.api.php we always should call
drupal_alter('apachesolr_query', $query); before executing a query.
Comments
Comment #1
mkalkbrennerIf you're using the latest dev version of Apache Solr Multilingual you have to use the latest dev version of Apache Solr Search Integration as well. The method getContext() has been introduced with patch #1918030: Allow contrib modules to add custom settings to search pages and committed on March 13, 2013 at 6:42pm.
It has been mentioned as well on the #1702354: Apache Solr Multilingual 7.x Roadmap.
Comment #2
HydroZ commentedYou are right. Upgrading to the latest Dev-Version fixed the problem. Thanks for your fast response and for the great module(s)!