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,
));
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

howto created an issue. See original summary.

howto’s picture

This is my patch

MustangGB’s picture

Priority: Critical » Normal

Indeed $args is optional, not sure what the cause of your issue might be, but this isn't the fix for it.