Hi,
I've got a view where I want to list all nodes with empty imagefield
So I add a filter to my view on "Content: Image - list" (field_image_list field of my table)
I can see that this filter handeled by a boolean operator filter handler which can test if the value is =0 (false) or =1(true)
But when I look at the database, I can see that when there's no image, the field_image_list field is set to "NULL", but not "0".
To make it work, and add a "WHERE field_image_list IS NULL" instead of "WHERE field_image_list = 0" to my request, I've 2 solutions :
- replace the boolean operator filter handler by a numeric filter handler (which has an empty operator):
in filefield_field.inc, line 82, replace
$data[$table_alias][$field['field_name'] .'_list']['filter']['handler'] = 'views_handler_filter_boolean_operator';
by
$data[$table_alias][$field['field_name'] .'_list']['filter']['handler'] = 'views_handler_filter_numeric';
- modifiy the view module. I could update views_handler_filter_boolean_operator.inc to add an empty operator ("is null" and "is not null"), but I don't know exactaly how to do that.
Comments
Comment #1
Anonymous (not verified) commentedI've just added an issue in the views module to exchange points of view :
http://drupal.org/node/554296
Comment #2
Anonymous (not verified) commentedI've just added an issue in the view module to exchange points of view
http://drupal.org/node/554296
Comment #3
giorgio79 commented