I created simple filter to filter nodes so that only storys (not pages) are displayed.

It was NodeType IsOneOf Story

When I goto that view however I get a display showing a form (see attachment) instead of the view results. The form is the same form elements as on the filter page, that is the operator select box with IsOneOf and IsNoneOf and the multiSelect box page and story.

When I change the filter to IsNoneOf and select the nodeType to be story however the filter works fine. (So I have a workaround)

My version from cvs seems to be the same as the 4.7.0 release except for views_data.inc and views_form.inc are missing (and some txt file). Don't know if they make a difference

CommentFileSizeAuthor
scrn.png1.37 KBkhylo

Comments

Joshua E Cook’s picture

Status: Active » Reviewed & tested by the community

I was having the same problem with Drupal 4.7.0 and views-csv. The problem seems to be that MySQL doesn't like the IN() operator with only one argument.

This patch seems to fix it:

--- modules/views/views_query.inc	2006-05-02 14:02:00.000000000 -0400
+++ modules/views/views_query.inc	2006-05-03 11:18:01.000000000 -0400
@@ -110,7 +110,7 @@
           $not = "NOT";
         }
         $query->ensure_table($table);
-        $query->add_where("$table.$field $not IN ('" . implode("','", $filter['value']) . "')");
+        $query->add_where("1=($table.$field $not IN ('" . implode("','", $filter['value']) . "'))");
       }
       else {
         $howmany = count($filter['value']);
merlinofchaos’s picture

views_data.inc and views_form.inc have been deprecated; it's good that they are missing. =)

That issue with MySQL and IN with only one argument kind of sucks. Also, I don't think that fits what the original poster was saying.

khylo: It looks like you hit 'expose' on the filter, creating an exposed filter. If you open the 'exposed filters' section, you can remove it, and then the form won't be visible. The other weirdness you are seeing I am unable to duplicate on my test system. I'm hoping it's all because you have the filter exposed! Please let me know what you find.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Active
merlinofchaos’s picture

Status: Active » Fixed

No new info from the original poster; and the IN() thing is probably not it. Closing this. Re-open if there is more for me to do.

Anonymous’s picture

Status: Fixed » Closed (fixed)