In faceted_search_views.module:

This line (#33) fails if the argument is just a simple number like a node ID.

 if (isset($view->args[0]['faceted_search'])) {   // this is true when you don't expect it to be
   $search = $view->args[0]['faceted_search'];
       
    if ($search->ready()) {                         // So it barfs here because $search is null.

Replacing the if with this seems to fix it

 if (is_array($view->args[0]) && array_key_exists('faceted_search',$view->args[0])) {

I don't have time to do a patch and test it extensively right now.

CommentFileSizeAuthor
#3 faceted_search_views_arg.patch810 bytesDavid Lesieur

Comments

jpp’s picture

Ok I did some more testing and the one line change above seem to fix it - I'm getting the expected output and not more errors.

junro’s picture

Same problem, and this code seems to fix it with me too :)

David Lesieur’s picture

Status: Active » Needs review
StatusFileSize
new810 bytes

What do you think of the following patch?

junro’s picture

I'm not a developer and never used Faceted Search before, so I can't tell what I think about this patch... maybe I should take off the code before and apply this patch and see what happens :)

junro’s picture

The patch seems to work great.

If you have this error:

Call to a member function ready() on a non-object ... /modules/faceted_search/faceted_search_views.module on line 33

Use the patch #3

junro’s picture

Je ne peux seulement avoir l'affichage avec views en appuyant sur "plus d'options", sans rien mettre dans le champ de recherche.

doughold’s picture

Patch worked like a charm, thanks!

David Lesieur’s picture

Status: Needs review » Fixed

Committed!

eliosh’s picture

i solved this bug in this manner:

  if (is_array($view->args[0]) && array_key_exists('faceted_search',$view->args[0])) {
    $search = $view->args[0]['faceted_search'];
       if(is_object($search)){

but this solution is much more better :-)

Status: Fixed » Closed (fixed)

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