Closed (fixed)
Project:
Flag
Version:
6.x-1.1
Component:
Views integration
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Jul 2009 at 16:56 UTC
Updated:
8 May 2010 at 20:16 UTC
I'm trying to create a view that list all the nodes that have a flag count < 4.
But basically, what it does is listing the nodes with flag count of 1, 2 and 3 but not the ones with no flag.
I'm pretty sure, it comes from the fact that NULL is not a number, but how can I solve this ?
Thanks !
Comments
Comment #1
quicksketch- Add a "Flags: Node flag counter" relationship, select the flag you want.
- Add a "Flags: Flag counter" filter, limit to content flagged less than 4
This request was opened months ago, so I'm going to preemptively mark it fixed. Please reopen if you have further questions.
Comment #3
halldb02 commentedFollowing the steps in comment (1) #comment-2041520 is how you get to the point where you experience the problem outlined by the post.
The bug is also exactly what the poster thinks it is: NULL is not a number, so a post which is not flagged as offensive will get filtered out just the same as if it was above the threshold.
However, the problem may partly be with Views.
This is how I modified function op_simple in views_handler_filter_numeric.inc to fix the problem:
It might be better implemented as an override handler that is included with Flags.
Comment #4
halldb02 commentedComment #515814-1: Create a view of nodes with a given number of flags or no flags actually outlines steps to reproduce the problem, it does not fix the problem.
Comment #5
BenK commentedSubscribing....
Comment #6
quicksketchSee #411376: Add "OR IS NULL" as an option to views_handler_filter_numeric for the Views feature request.