Reproduce:
- Add 2 searchable fields
- Add a Combine fields filter with those 2 fields
- Remove one of the fields
- Save view and search with the combined filter
Expected result:
- One of the fields in the Combine fields filter config is ignored, since it doesn't exist anymore. OR
- You can't save the view, because it contains invalid config. OR
- When all the combined filter fields are missing: the filter doesn't do anything
Result instead:
Fatal error: Call to a member function ensure_my_table() on a non-object in views/handlers/views_handler_filter_combine.inc on line 60
I don't know which of the expected results is the right one, so I won't make a patch with one.
Comments
Comment #1
rudiedirkx commentedComment #2
puddyglumI also get this when I simply exclude a field from being displayed. My goal is to be able to search by the value of a field, but not display it in the results.
Comment #3
puddyglumA similar issue was resolved by https://www.drupal.org/node/2284593
Can you apply that patch and see?
Comment #4
puddyglumComment #5
rudiedirkx commentedYup, that's it. Why did this issue not get any love in forever? =(
Comment #6
puddyglumThe only issue I have with this patch is that it simply protects itself from a fatal error rather than preventing empty field objects.
The patch keeps the above from throwing a fatal error, but the field is still not searched by the combine fields filter.
Is this Works as designed?
The user has control over whether or not to include a field in the Combine Fields filter, so it seems like they should be able to search on it. Would it make sense to code a way for that to happen?
Comment #7
puddyglumComment #8
rudiedirkx commentedNo, that doesn't work properly IMO, but that wasn't my issue. A hidden field should be searchable. It's VERY strange if it isn't. I haven't reproduced. You?
Maybe we should have this discussion in the other issue, since people actually watch that and it's relevant.
Comment #9
puddyglumOriginal issue resolved by #2284593: Fatal error: Call to a member function ensure_my_table() on a non-object , related issue created at #2489818: Combine fields filter does not search fields excluded form display
Marking this a duplicate