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?

CommentFileSizeAuthor
#5 replace_first_by_this-1437774-3.patch615 bytesjoelrotelli
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

swortis’s picture

Title: PHP fatal error - on searches with spaces or punctuation » PHP fatal error - on searches with punctuation
swortis’s picture

Accidently wrote 'spaces and punctuation' - meant only 'punctuation'.

flaures’s picture

There 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.

abasso’s picture

Had 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?

joelrotelli’s picture

Hi,

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).

cpliakas’s picture

Status: Active » Reviewed & tested by the community

Looks good to me. Thanks for the patch! Marking as RTBC.

cpliakas’s picture

Priority: Normal » Critical

Bumping up priority.

cpliakas’s picture

Status: Reviewed & tested by the community » Fixed

Committed at http://drupalcode.org/project/search_facetapi.git/commit/04e393e.

Joel, congrats on your first credited commit to a Drupal module!

Status: Fixed » Closed (fixed)

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