Closed (outdated)
Project:
Views (for Drupal 7)
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
22 Mar 2012 at 13:28 UTC
Updated:
14 Mar 2019 at 18:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
derhasi commentedOne solution could be to use
$fields[] = " IFNULL($field->table_alias.$field->real_field, '')";, but i guess this is restricted to MySQL.Another would be to use OR clauses for checking each field separately, instead of using CONCAT.
Comment #2
dawehnerWhen we developed this filter we said: Let's make sure it works for most cases, because for example certain handlers will work a bit different internally.
So what we actually want on this issue is contact_ws, see http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_co...
It would be cool if there would be simpletests for this handler type.
Comment #3
derhasi commentedoh, yes, sure CONCAT_WS is a solution. I attached a patch with the additional
' 'as a separator.Within that patch there's also a test (my first one ever).
Comment #4
tim.plunkettUploading the test separately to see that it fails, and adding it to the .info file.
Comment #6
tim.plunkettOkay, rewrote a chunk of the test.
Comment #8
tim.plunkettOkay, I hate override_option.
Comment #10
tim.plunkett#8: views-1494226-8-test-only.patch queued for re-testing.
Comment #11
tim.plunkett#8: views-1494226-8.patch queued for re-testing.
Comment #12
tim.plunkettgit.d.o went down, hence the retests.
The test was very close, glad to have more coverage (even though we'll now have more than 1337 tests)
Comment #13
tim.plunkettThis part is the only reason I didn't RTBC. There seems to be no better way to do it, but I wanted to check.
Comment #14
dawehnerFrom my experience you can use
$view->display['default']->display_options['fields']['foo'] = array(id' => 'job'...) but if it works things like that doesn't matter that much. Just changed it and committed it.
Thanks for the work!!
If the compound filter will be backported this fix should be considered as well.
Comment #15
tim.plunkettI KNEW there was a way to do it. I kept trying to add to
$view->display['default']->handler->options['fields']and$view->display['default']->options['fields'], which made it show up, but not get added to$this->view->fields. Thanks!Comment #16
derhasi commentedtim and daniel, thanks for making the test work ;)
Comment #17
chris matthews commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue