Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I'm trying to use apache solr and search404 but each time I enter a wrong url ike /blabla, I've got this message :
The Apache Solr search engine is not available. Please contact your site administrator.
The page you requested does not exist. For your convenience, a search was performed using the query blabla.
Notice: Undefined index: module in apachesolr_search_form_search_form_alter() (line 980 of D:\Documents\www\drupal-7.x\sites\all\modules\apachesolr\apachesolr_search.module).
Solr works nice otherwise.
Comment | File | Size | Author |
---|---|---|---|
#6 | search404-solr-errors-1353188-6.patch | 579 bytes | drasgardian |
#4 | search404-solr-errors-1353188-4.patch | 2.26 KB | paulmckibben |
#3 | 1353188-3-search404-solr-errors.patch | 1.69 KB | milesw |
Comments
Comment #1
milesw CreditAttribution: milesw commentedI'm getting the Notice as well, but not the error. Which version are of the Apache Solr module are you using? The dev version has some minor changes that break this module.
Comment #2
abrebion CreditAttribution: abrebion commentedI'm using 7.x-1.0-beta11
Comment #3
milesw CreditAttribution: milesw commentedSorry, never got a notification that you replied.
Here's a patch with the changes I'm using to get Search404 working with the dev version of apachesolr.module. Not sure if beta11 is the same, but looks like they just cut beta12 a couple days ago and I'm guessing the patch will work with beta12.
Note this patch will probably break Search404 compatibility with search modules other than Apache Solr.
Comment #4
paulmckibben@milesw, thanks for your patch. It helped me start!
Here is a modified patch that should *not* break compatibility with other search modules.
An additional note: even with this patch, you will still get the "The Apache Solr search engine is not available" error, even though search results are still returned. You can turn off this error message by going to admin/config/search/apachesolr/settings, expand "Advanced Configuration," and set "On failure" to "Show no results." I think this is a bug in the apachesolr project, and I will file an issue there and add a comment here to point to that issue for reference.
Comment #5
paulmckibbenAs promised, I filed an issue with the apachesolr project: #1419290: When $conditions is empty, search_data() results in "The Apache Solr search engine is not available" (but results are returned)
Comment #6
drasgardian CreditAttribution: drasgardian commentedI was receiving these very similar errors about undefined index: module
which I fixed with the attached patch
Comment #7
zyxware CreditAttribution: zyxware commented@milesw, @paulmckibben - Thanks for the patches. I have applied the patch in the 7.x-1.x branch.
@drasgardian - Thanks for the patch. I am not sure if we can take out the parameters from the drupal_get_form call.
Please revert if there are issues.