Beta 3 lacks this function (or maybe the function was renamed ?).

Function exists here :
search_api_multi\views\search_api_multi.views.inc (3 hits)
Line 82: $table[$key]['field']['handler'] = _search_api_views_field_handler($type, $inner_type);
Line 148: $table['search_api_relevance']['field']['handler'] = _search_api_views_field_handler('decimal', 'decimal');
Line 167: $table['search_api_multi_index']['field']['handler'] = _search_api_views_field_handler('options', 'options');

Comments

drunken monkey’s picture

Status: Active » Needs review
StatusFileSize
new2.43 KB

Thanks for reporting!
Attached is a patch which should fix the problem. Please test!

adixb’s picture

Now I'm getting the following error:

Catchable fatal error: Argument 2 passed to _search_api_views_add_handlers() must be an array, object given, called in /var/www/sites/all/modules/search_api_multi/views/search_api_multi.views.inc on line 93 and defined in /var/www/sites/all/modules/search_api/contrib/search_api_views/search_api_views.views.inc on line 115

If I cast the type to (array) on line 93 of search-api_multi.views.inc, I get this error:

$table[$key] += _search_api_views_add_handlers($fields[$prefix . $property], (array)$value);

Catchable fatal error: Argument 3 passed to _search_api_views_add_handlers() must be an instance of EntityMetadataWrapper, none given, called in /var/www/sites/all/modules/search_api_multi/views/search_api_multi.views.inc on line 93 and defined in /var/www/sites/all/modules/search_api/contrib/search_api_views/search_api_views.views.inc on line 115

beanjammin’s picture

Status: Needs review » Needs work

Same results as #2:

Catchable fatal error: Argument 2 passed to _search_api_views_add_handlers() must be an array, object given, called in /var/www/sites/all/modules/contrib/search_api_multi/views/search_api_multi.views.inc on line 93 and defined in /var/www/sites/all/modules/contrib/search_api/contrib/search_api_views/search_api_views.views.inc on line 115

drunken monkey’s picture

Title: Call to undefined function _search_api_views_field_handler » Adapt Views integration to recent Search API changes
Version: 7.x-1.0-beta3 » 7.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new3.44 KB

#1608360: Argument 2 passed to _search_api_views_add_handlers() must be an array and this should really be discussed together. It makes absolutely no sense to half-fix a function.

So please test/review the attached combined patch.

@ adambehnke: Does the infinite loop occur with this? Could you maybe find out more, where in the code the loop is, etc.?

badjava’s picture

I applied the patch from #4, enabled the module and I get the following errors which loop:

Warning: Missing argument 2 for list_options_list() in list_options_list() (line 437 of /var/www/docroot/modules/field/modules/list/list.module).
Warning: Missing argument 3 for list_options_list() in list_options_list() (line 437 of /var/www/docroot/modules/field/modules/list/list.module).
Warning: Missing argument 4 for list_options_list() in list_options_list() (line 437 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined variable: instance in list_options_list() (line 438 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined variable: entity_type in list_options_list() (line 438 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined variable: entity in list_options_list() (line 438 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined index: entity type in entity_views_field_definition() (line 215 of /var/www/docroot/sites/all/modules/contrib/entity/views/entity.views.inc).
Warning: Missing argument 2 for list_options_list() in list_options_list() (line 437 of /var/www/docroot/modules/field/modules/list/list.module).
Warning: Missing argument 3 for list_options_list() in list_options_list() (line 437 of /var/www/docroot/modules/field/modules/list/list.module).
Warning: Missing argument 4 for list_options_list() in list_options_list() (line 437 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined variable: instance in list_options_list() (line 438 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined variable: entity_type in list_options_list() (line 438 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined variable: entity in list_options_list() (line 438 of /var/www/docroot/modules/field/modules/list/list.module).
Warning: Missing argument 2 for list_options_list() in list_options_list() (line 437 of /var/www/docroot/modules/field/modules/list/list.module).
Warning: Missing argument 3 for list_options_list() in list_options_list() (line 437 of /var/www/docroot/modules/field/modules/list/list.module).
Warning: Missing argument 4 for list_options_list() in list_options_list() (line 437 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined variable: instance in list_options_list() (line 438 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined variable: entity_type in list_options_list() (line 438 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined variable: entity in list_options_list() (line 438 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined index: entity type in entity_views_field_definition() (line 215 of /var/www/docroot/sites/all/modules/contrib/entity/views/entity.views.inc).
Warning: Missing argument 2 for list_options_list() in list_options_list() (line 437 of /var/www/docroot/modules/field/modules/list/list.module).
Warning: Missing argument 3 for list_options_list() in list_options_list() (line 437 of /var/www/docroot/modules/field/modules/list/list.module).
Warning: Missing argument 4 for list_options_list() in list_options_list() (line 437 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined variable: instance in list_options_list() (line 438 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined variable: entity_type in list_options_list() (line 438 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined variable: entity in list_options_list() (line 438 of /var/www/docroot/modules/field/modules/list/list.module).
Notice: Undefined index: entity type in entity_views_field_definition() (line 215 of /var/www/docroot/sites/all/modules/contrib/entity/views/entity.views.inc).
Notice: Undefined index: entity type in entity_views_field_definition() (line 215 of /var/www/docroot/sites/all/modules/contrib/entity/views/entity.views.inc).

badjava’s picture

This issue can be solved by applying this patch http://drupal.org/node/1327964#comment-6049278

drunken monkey’s picture

Status: Needs review » Closed (duplicate)

Oh man, a third issue for that?
And even with quite some work already …

Marking this one as a duplicate, since it's much younger.
Please see #1327964: Views integration is out of sync with Search API for further discussion and patches.