Created a view with just a default display that has a Search contextual filter.

Via a custom block, I load the view, and add a search query as an argument

$view = views_get_view('similar_items');
$content = $view->execute_display(NULL, array('something'));
...

And I get:

Notice: Undefined index: group in views_handler_argument_search->query() (line 57 of /var/www/sites/all/modules/contrib/views/modules/search/views_handler_argument_search.inc).
Notice: Undefined index: group in views_handler_argument_search->query() (line 65 of /var/www/sites/all/modules/contrib/views/modules/search/views_handler_argument_search.inc).
Notice: Undefined index: group in views_handler_argument_search->query() (line 83 of /var/www/sites/all/modules/contrib/views/modules/search/views_handler_argument_search.inc).

?

Comments

dawehner’s picture

What happens if you use $view->preview instead of execute_display?

merlinofchaos’s picture

It'll be the same.

The search query argument was copied from the filter and uses $this->options['group'] but there is no 'group' for arguments. All arguments are always in the same group.

mstef’s picture

@dereine: merlin is correct. I also get the error when previewing inside the Views UI (oddly, only some times)..

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Does this still happen with the latest dev version? This should be fixed in the meantime

mstef’s picture

Version: 7.x-3.0-beta3 » 7.x-3.x-dev
Status: Postponed (maintainer needs more info) » Closed (fixed)

Good to go - thanks..

Probably should have tried that first. Since I didn't see an issue for it, I figured it wasn't addressed.