The same problem occurs when using a negativ argument filter i.e. checking "exclude argument". If there are null values in the column the null rows are regarded as having(!) the excluded value. This is commonly not desired.
The SQL Code is
... WHERE field != 'x' ...and should be
... WHERE field != 'x' OR field IS NULLSorry, but I am not responsible for his ugly SQL behaviour.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 741234_views_empty_arg_check_null.patch | 1.5 KB | dawehner |
| #7 | 741234_views_empty_arg_check_null.patch | 2.6 KB | dawehner |
| #4 | 741234_views_empty_arg_check_null.patch | 1.19 KB | voxpelli |
Comments
Comment #1
skylord commentedsubscribing
For excluding argument i use a simple patch to handlers/views_handler_argument_numeric.inc:
Comment #2
aw04obee commentedBig thank you - just ran into this problem. This certainly should be committed.
Comment #3
dawehnerUpdate to make it as a real patch
Comment #4
voxpelli commentedHere's a patch for Views 6.x-2.x and Views 6.x-3.x (same patch works for both).
Seems like the 7.x-3.x isn't in a state to accept this patch.
Comment #5
dawehnerViews 7.x-3.x will need a slightly different patch.
Looks fine.
Comment #6
merlinofchaos commentedCommitted to D6 2.x and 3.x
Comment #7
dawehnerUploading the progress
Comment #8
dawehnerSo here is a real patch.
Comment #9
dawehnerCommited to git.