Warning: Missing argument 3 for views_plugin_query_default::init(), called in /var/www/sites/all/modules/apachesolr_views/apachesolr_views_query.inc on line 106 and defined in views_plugin_query_default->init() (line 80 of /var/www/sites/all/modules/views/plugins/views_plugin_query_default.inc).

Reverting to the previous release & running updates fixes it. Using the latest Views 3 dev.

Here's my view if that helps:


$view = new view;
$view->name = 'solr_users';
$view->description = '';
$view->tag = '';
$view->base_table = 'apachesolr_node';
$view->human_name = 'Solr Users';
$view->core = 6;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'mini';
$handler->display->display_options['pager']['options']['items_per_page'] = '20';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['expose']['items_per_page_options_all'] = 0;
$handler->display->display_options['style_plugin'] = 'views_fluidgrid';
$handler->display->display_options['style_options']['column_width'] = '310';
$handler->display->display_options['row_plugin'] = 'semanticviews_fields';
$handler->display->display_options['row_options']['skip_blank'] = 1;
$handler->display->display_options['row_options']['semantic_html'] = array(
  'nodefield' => array(
    'element_type' => 'div',
    'class' => 'item',
  ),
  'counter' => array(
    'element_type' => 'div',
    'class' => '',
  ),
);
/* Field: Node: Node field */
$handler->display->display_options['fields']['nodefield']['id'] = 'nodefield';
$handler->display->display_options['fields']['nodefield']['table'] = 'apachesolr_node_node';
$handler->display->display_options['fields']['nodefield']['field'] = 'nodefield';
$handler->display->display_options['fields']['nodefield']['label'] = '';
$handler->display->display_options['fields']['nodefield']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['nodefield']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['nodefield']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['nodefield']['alter']['external'] = 0;
$handler->display->display_options['fields']['nodefield']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['nodefield']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['nodefield']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['nodefield']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['nodefield']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['nodefield']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['nodefield']['alter']['trim'] = 0;
$handler->display->display_options['fields']['nodefield']['alter']['html'] = 0;
$handler->display->display_options['fields']['nodefield']['element_label_colon'] = 1;
$handler->display->display_options['fields']['nodefield']['element_default_classes'] = 1;
$handler->display->display_options['fields']['nodefield']['hide_empty'] = 0;
$handler->display->display_options['fields']['nodefield']['empty_zero'] = 0;
$handler->display->display_options['fields']['nodefield']['links'] = 1;
$handler->display->display_options['fields']['nodefield']['comments'] = 0;
/* Field: Global: View result counter */
$handler->display->display_options['fields']['counter']['id'] = 'counter';
$handler->display->display_options['fields']['counter']['table'] = 'views';
$handler->display->display_options['fields']['counter']['field'] = 'counter';
$handler->display->display_options['fields']['counter']['label'] = '';
$handler->display->display_options['fields']['counter']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['counter']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['counter']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['counter']['alter']['external'] = 0;
$handler->display->display_options['fields']['counter']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['counter']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['counter']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['counter']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['counter']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['counter']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['counter']['alter']['trim'] = 0;
$handler->display->display_options['fields']['counter']['alter']['html'] = 0;
$handler->display->display_options['fields']['counter']['element_label_colon'] = 1;
$handler->display->display_options['fields']['counter']['element_default_classes'] = 1;
$handler->display->display_options['fields']['counter']['hide_empty'] = 0;
$handler->display->display_options['fields']['counter']['empty_zero'] = 0;
$handler->display->display_options['fields']['counter']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['counter']['counter_start'] = '1';
/* Sort criterion: Apache Solr: Search Score */
$handler->display->display_options['sorts']['score']['id'] = 'score';
$handler->display->display_options['sorts']['score']['table'] = 'apachesolr_node';
$handler->display->display_options['sorts']['score']['field'] = 'score';
$handler->display->display_options['sorts']['score']['order'] = 'DESC';
/* Argument: Apache Solr: Taxonomy terms */
$handler->display->display_options['arguments']['tid']['id'] = 'tid';
$handler->display->display_options['arguments']['tid']['table'] = 'apachesolr_node';
$handler->display->display_options['arguments']['tid']['field'] = 'tid';
$handler->display->display_options['arguments']['tid']['style_plugin'] = 'default_summary';
$handler->display->display_options['arguments']['tid']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['tid']['default_argument_skip_url'] = 0;
$handler->display->display_options['arguments']['tid']['break_phrase'] = 1;
$handler->display->display_options['arguments']['tid']['not'] = 0;
/* Filter: Apache Solr: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'apachesolr_node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
  'profile' => 'profile',
);

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'solr';
$translatables['solr_users'] = array(
  t('Defaults'),
  t('more'),
  t('Apply'),
  t('Reset'),
  t('Sort by'),
  t('Asc'),
  t('Desc'),
  t('Items per page'),
  t('- All -'),
  t('Offset'),
  t('All'),
  t('Page'),
);

Comments

ndevelder’s picture

I also get this exact error with the latest views release candidate....

dstuart’s picture

I have updated the init interface to be inline with views. I haven't had a chance to test it enough could you try again with the latest dev

Regards

Dave

dstuart’s picture

Assigned: Unassigned » das-peter
Status: Active » Needs review
das-peter’s picture

Assigned: das-peter » dstuart

Not sure what I could review here - especially since I've no clue about D6 stuff ;)
However, if the change to review is this one http://drupalcode.org/project/apachesolr_views.git/blobdiff/929eb14b94a8... it looks absolutely reasonable to me.

rjbrown99’s picture

Status: Needs review » Active

There is no patch, changing status back to active.

dstuart’s picture

Yea sorry this was my bad, I commited instead of puttting a patch in. http://drupalcode.org/project/apachesolr_views.git/blobdiff/929eb14b94a8... defines the change make which fixed the problem for me. I just wanted confirmation it also solved @hobgobbler issue.

alibama’s picture

#6 isn't working for me with the latest dev? am glad to test any patches though :) thanks all...

dstuart’s picture

ok ill take another look thanks for the help

Rgds

Dave

alibama’s picture

Hi Dave - are you ever on irc? i would like to be of greater help, testing patches - documentation etc.. i just don't trust myself to do good coding work

also testing this code here http://drupal.org/node/543386 (Unwanted "unclick" links in Current search block for values excluded by filters)

and curious as to whether this needs to be considered
http://drupal.org/node/1323966 (Doesn't integrate with Apachesolr Search taxonomy filter blocks)

am on IRC most of the day and if you are able to assign work to me please do so, my boss is adamant about getting solr views running on our site :) I've started using drupal.org/project/quickstart to begin debugging this, however i'm still learning there as well...

thanks for all
Anson

dstuart’s picture

Status: Active » Needs review

I'm not getting the error as per the original issue. The view supplied doesn't have text based search option and is causing a NPE in Solr. This is kind of a Apachesolr module issue as the 6.x version doesn't support non text search. We can look at implementing something similar to the Apachesolr 7.x functionality where are filters set will be added to the q field in Solr

timnash’s picture

Status: Needs review » Active

I got this error upon updating. All of the taxonomy filter blocks no longer supplied arguments, they would just link back to the same page. Rolled back to Feb 11 snapshot that I had and it works again.

EDIT: Ah so this is because the filtering works differently in 7 vs 6? Would it be possible to have a 6.x version with this code the way it was, as this is still set to work with 6.x-2.x and not the new 6.x-3.x or recommended 6.x-1.x of the apachesolr module?

timnash’s picture

Alright, here's something weird. I manually made all of the changes from the commits from Feb 25 2011 on, and even after making all of them, everything works fine.

I'm going to check my manually changed version against the version available here and see what the difference is, will update this post when I do.

EDIT: So, there are a bunch of differences. Not sure how that could happen. I'm guessing it was from this commit: http://drupalcode.org/project/apachesolr_views.git/commitdiff/46b1abd75f... because it's called, 'Adding lost functionality from merge'. I'm assuming that the merge broke some more things that didn't end up getting changed. I don't understand why those changes are not in the git logs though.

puzl’s picture

I still have this problem. Is there any update? Do I need to check any patch?

aidanlis’s picture

What's the gitref for the version before this was bug was introduced? timnash are you saying it's 46b1abd7? That looks fairly innocuous eh :/

timnash’s picture

StatusFileSize
new33.2 KB

It seems to me that something happened and code was removed from the module. As far as I can tell, there is no reference to this in git. Attached is the version that I have (from Feb 2011) that has taxonomy filters that work. NOTE: This may contain changes I made because date wasn't working (I'm not sure, I was working on this project back in April. Although, if it does, bonus for you.)

bking’s picture

Same problem here as Timnash. I have downloaded the zip timnash provided and that worked perfectly. Thank you! Taxonomy facets are now functioning.

Views 6.x-3.0+68-dev
Apache Solr Integration 6.x-2.0-beta5

Priorly I was on:

Apache Solr Views Integration 6.x-1.0+10-dev
Taxonomy facets did not work on this version.

rjbrown99’s picture

At one point the codebase did get confused between head/master/6.x-1.x. I believe dstuart fixed it but perhaps not. I am maintaining my own fork with many of the issue queue patches applied that are not yet in the main module here. It is in use on my sites with taxonomy filtering. You are welcome to it for reference (look at my commit log), but I am not encouraging you to use it as I'd strongly prefer that the actual issues are fixed here in this issue queue.

mustanggb’s picture

StatusFileSize
new673 bytes

Fix attached

gillisig’s picture

#15 - Works but causes some error with views when saving modules and blocks

#18 - Works perfectly at first glance.

mustanggb’s picture

Status: Active » Needs review
torgospizza’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #18 resolves the issue for me. Please commit this to the latest 6.x-1.x-dev.

dstuart’s picture

#18 has now been committed, and a new dev release rolled. Are we happy to close this one

torgospizza’s picture

Thanks dstuart! I think we're happy to close this one now. I recently updated my code to reflect new security updates, etc., and this was the one patch I needed to remember in order to fix our broken catalog :)

dstuart’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.