Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I create a view has 2 fields then I add filter "fields comparison" (views_handler_filter_fields_compare) to it. But this does not affect the query.
I found that function add_where_expression() not work when 3rd arg is empty.
$this->query->add_where_expression($this->options['group'], $snippet);
But I change the line to below, it works.
$this->query->add_where_expression($this->options['group'], $snippet.' AND :val', array(
':val'=>1,
));
Comment | File | Size | Author |
---|---|---|---|
#2 | views_handler_filter_fields_compare-2815107.patch | 669 bytes | howto |
Comments
Comment #2
howto CreditAttribution: howto commentedThis is my patch
Comment #3
MustangGB CreditAttribution: MustangGB commentedIndeed $args is optional, not sure what the cause of your issue might be, but this isn't the fix for it.