get a fatal error when using a finder/ automcomplete search:
Call to a member function get_option() on a non-object in /home/cobrasys/public_html/sites/all/modules/views/includes/view.inc on line 2489
This *used to* work but doesn't now.
I read through the forums and haven't found a good clue as to this.
Demo:
go to http://cobrasys.com/customer-type/military, type "AK" into the field on the right, click any thing returned from the search.
$finder = new finder();
$finder->disabled = FALSE; /* Edit this to true to make a default finder disabled initially */
$finder->api_version = 2;
$finder->name = 'new_part_number';
$finder->views_view = 'finder_node';
$finder->views_display = 'page_1';
$finder->title = 'New Part Number';
$finder->description = '';
$finder->path = 'new_part_number';
$finder->block = TRUE;
$finder->status = TRUE;
$finder->settings = array(
'block' => TRUE,
'form_on_page' => TRUE,
'find_button' => TRUE,
'find_text' => 'Find',
'go_text' => 'Go',
'ajax_effect' => 'none',
'show_results' => 'completed',
'results_style' => 'views',
'no_results' => 'default',
'pager' => 10,
'redirect' => 'never',
'element_logic' => 'AND',
'url' => 'enabled',
'url_delimiter' => ',',
);
$finder->elements = array(
'part' => (object) array(
'id' => 'part',
'finder' => 'new_part_number',
'settings' => array(
'field_logic' => 'OR',
'value_logic' => 'AND',
'match' => 'e',
'max_suggestions' => 10,
'autocomplete_field_logic' => 'OR',
'autocomplete_value_logic' => 'OR',
'autocomplete_match' => 'c',
'fields' => array(
'field_data_field_part_number.field_part_number_value' => (object) array(
'table' => 'field_data_field_part_number',
'field' => 'field_part_number_value',
'relationship' => NULL,
'format' => 'filter_xss',
),
),
),
'weight' => 0,
'title' => 'part',
'parent' => '',
'element' => 'autocomplete',
),
);
Call stack
( ! ) Fatal error: Call to a member function get_option() on null in /var/www/sds/sites/all/modules/views/includes/view.inc on line 2489
Call Stack
# Time Memory Function Location
1 0.0001 242712 {main}( ) ../index.php:0
2 0.1255 24038008 menu_execute_active_handler( ) ../index.php:21
3 0.1255 24038944 call_user_func_array:{/var/www/sds/includes/menu.inc:517} ( ) ../menu.inc:517
4 0.1255 24039408 finder_page( ) ../menu.inc:517
5 0.1304 25059864 finder->page( ) ../finder.module:116
6 0.1304 25060672 finder->render( ) ../finder.inc:376
7 0.1753 26695024 finder->results( ) ../finder.inc:435
8 0.1753 26693432 finder->find( ) ../finder.inc:895
9 0.1754 26697904 finder->views_find( ) ../finder.inc:556
10 0.1942 30113128 view->execute_display( ) ../finder.inc:810
11 0.1942 30113352 view->pre_execute( ) ../view.inc:1342
12 0.1942 30114616 webform_views_pre_view( ) ../view.inc:1392
13 0.1942 30115088 _webform_view_find_id( ) ../webform.views.inc:447
14 0.1942 30115192 views_db_object->get_items( ) ../webform.views.inc:537
Comments
Comment #1
sterndata commentedComment #2
vefverksmidja commentedI found a temporary workaround for this problem, see here: https://www.drupal.org/node/2391869#comment-9568249
Comment #3
sadashiv commentedHi,
I debugged and found that finder module adds a display to the view and the newly added (temporary) display don't have a handler. I am attaching a patch that fixed the issue for me.
Hth,
Sadashiv.
Comment #4
aquaphenix#3 solved the problem, thanks @sadashiv
Comment #6
danielb commentedcommitted, thanks