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.
I'm getting a white screen whenever a search with punctuation is made. If I return to the site I see:
"Notice: Undefined variable: first in FacetapiQuery->execute() (line 80 of [pathto] /search_facetapi/search_facetapi.extender.inc)"..
For instance if I search for "George Washington False Teeth" the search results are as expected. If I search for "George Washington's False Teeth" I get a white screen and then the subsequent error message.
Anyone have any suggestions?
Comment | File | Size | Author |
---|---|---|---|
#5 | replace_first_by_this-1437774-3.patch | 615 bytes | joelrotelli |
Comments
Comment #1
swortis CreditAttribution: swortis commentedComment #2
swortis CreditAttribution: swortis commentedAccidently wrote 'spaces and punctuation' - meant only 'punctuation'.
Comment #3
flaures CreditAttribution: flaures commentedThere seems to be an issue when dealing with complex search queries on lines 80 and 81 of /search_facetapi/search_facetapi.extender.inc.
Shouldn't $this be called instead of $first ? I've tried this fix and it seems to be working.
Comment #4
abasso CreditAttribution: abasso commentedHad same problem:
PHP Fatal error: Call to a member function join() on a non-object in [...]/search_facetapi.extender.inc on line 80
#3 above (changing $first to $this) seems to fix the problem but haven't had time to check why this is, any maintainer willing to take a look?
Comment #5
joelrotelli CreditAttribution: joelrotelli commentedHi,
I had the same problem when i was trying to do a search with excluded terms , like "house -garden".
The problem is fixed when i replace $first by $this like #3 says.
I have made a patch for that. (It's my first one, so i'm not sure if i'm doing it right).
Comment #6
cpliakas CreditAttribution: cpliakas commentedLooks good to me. Thanks for the patch! Marking as RTBC.
Comment #7
cpliakas CreditAttribution: cpliakas commentedBumping up priority.
Comment #8
cpliakas CreditAttribution: cpliakas commentedCommitted at http://drupalcode.org/project/search_facetapi.git/commit/04e393e.
Joel, congrats on your first credited commit to a Drupal module!