Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Views integration
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Jan 2015 at 15:58 UTC
Updated:
10 Feb 2015 at 20:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
darren ohComment #2
darren ohComment #3
drunken monkeyThanks for spotting this! Can't believe we missed this …
However, it's actually pretty inconsequential, as far as I can see, as
$this->fieldswill always be an empty array (unless I'm mistaken). As noted in the doc comment ofextractFields(), field handlers now load their (missing) data themselves. (They also wouldn't even know how to add fields to a Search API Views query, I guess, since they aren't Search API-specific anymore.)Which raises the question of why the whole code stayed there in the first place – but I guess we can just leave it there for now and do a better/cleaner job in D8, instead of having to figure out now what parts of that code actually still serve a purpose.
Anyways, patch committed. Thanks again!
Comment #5
darren ohThanks for fixing this. It was consequential for me because I am working with an external API which I cannot change. I populated
$this->fieldsby using the view query’s addField method in hook_search_api_views_query_alter(). I suppose I could have overridden the handler for each field type inhook_entity_views_field_handlers_alter()instead, but that seems needlessly complicated.