2 bugs are fixed with the patch:
- Using Views-7.x-3.x-dev no custom fields can be selected as filter.
- When selecting a custom fields as a filter _date_views_fields() does not pickup this field to process in the Views query.

Note: there is a check on "$field_name == 'entity_id'" in _date_views_fields(). This was changed in the latest Views version.

CommentFileSizeAuthor
date_views_.patch1.89 KBp.brouwers

Comments

FrequenceBanane’s picture

     // For Field module fields, get the date type.
     $custom = array();
-    if ($field_name == 'entity_id' && isset($content_fields[$table_name])) {
-
-      $field_name = $content_fields[$table_name]['entity_id']['field']['field_name'];
+    if (isset($content_fields[$table_name])) {
       $field = field_info_field($field_name);

What about if ($handler->definition['group'] == 'Fields') which raises an notice message "Undefined index : group" for me ? Is this another problem or do we have to remove this line since the is no if ($field_name == 'entity_id' && isset($content_fields[$table_name])) { but this in the code I downloaded ?

Thanks a lot in advance, though

a.siebel’s picture

Testing patch against actual .dev .

The line

if (isset($content_fields[$table_name])) {

in the patch is better working than the line

if ($handler->definition['group'] == 'Fields') {

in actual .dev .

FrequenceBanane’s picture

So I have replaced it, and it works *quite* fine : I can filter by value, but not by value2 (it simply does not appear in the WHERE clause of the MYSQL request)

rvilar’s picture

Priority: Normal » Major

This is an important issue, I think.

I have the same problem

mattbk’s picture

subscribe

karens’s picture

Status: Needs review » Closed (duplicate)

See #1075890: Re-work Views filters, the filter handing is being totally rewritten.