I am trying to create a view showing locations near a submitted zip with a default country (US). When I put in an argument such as 79764_50 (Locations within 50 miles of 79764) I get the following error:

Notice: Undefined index: group in location_handler_argument_location_proximity->query() (line 142 of .../sites/all/modules/location/handlers/location_handler_argument_location_proximity.inc).

If I take out line 142 it shows all values as if the argument isn't there and if I leave it in it shows no values.

Any help would be greatly appreciated. Thanks

Comments

Same here:
Undefined index: group in location_handler_argument_location_proximity->query() (line 180 of ....sites/all/modules/location/handlers/location_handler_argument_location_proximity.inc).

Using location-7.x-3.x-dev

Version:7.x-4.x-dev» 7.x-3.x-dev

subscribed

Status:Active» Needs review
StatusFileSize
new1.74 KB

It seems the same wrong code is in the drupal 6 version too, it just doesn't cause error notifications.
This patch should fix all occurrences of this bug.

The change is based on the fact that the group doesn't exist at that time and that views arguments all use zero and options['group'] is used in filters.

If people can try and confirm it would be great.

Status:Needs review» Reviewed & tested by the community

The patch works for me!

Status:Fixed» Closed (fixed)

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

Hi! This bug is still occurring for me, and am running latest version of the module (Drupal 7).

Here's a view export:

$view = new view;
$view->name = 'chip_shops';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'location';
$view->human_name = 'chip_shops';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = '\'Best Chippy Chips\' Awards';
$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['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = '100';
$handler->display->display_options['style_plugin'] = 'gmap';
$handler->display->display_options['style_options']['markertype'] = 'letters';
$handler->display->display_options['style_options']['latfield'] = 'lid';
$handler->display->display_options['style_options']['lonfield'] = 'lid';
$handler->display->display_options['style_options']['markerfield'] = 'lid';
$handler->display->display_options['style_options']['enablermt'] = 0;
$handler->display->display_options['style_options']['rmtfield'] = 'lid';
$handler->display->display_options['style_options']['center_on_nodearg_arg'] = 'distance';
$handler->display->display_options['style_options']['highlight_nodearg_arg'] = 'distance';
$handler->display->display_options['style_options']['tooltipfield'] = 'lid';
$handler->display->display_options['style_options']['bubbletextenabled'] = 1;
$handler->display->display_options['style_options']['bubbletextfield'] = 'lid';
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Location: Lid */
$handler->display->display_options['fields']['lid']['id'] = 'lid';
$handler->display->display_options['fields']['lid']['table'] = 'location';
$handler->display->display_options['fields']['lid']['field'] = 'lid';
/* Field: Content: Nid */
$handler->display->display_options['fields']['nid']['id'] = 'nid';
$handler->display->display_options['fields']['nid']['table'] = 'node';
$handler->display->display_options['fields']['nid']['field'] = 'nid';
$handler->display->display_options['fields']['nid']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['nid']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['nid']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['nid']['alter']['external'] = 0;
$handler->display->display_options['fields']['nid']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['nid']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['nid']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['nid']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['nid']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['nid']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['nid']['alter']['trim'] = 0;
$handler->display->display_options['fields']['nid']['alter']['html'] = 0;
$handler->display->display_options['fields']['nid']['element_label_colon'] = 1;
$handler->display->display_options['fields']['nid']['element_default_classes'] = 1;
$handler->display->display_options['fields']['nid']['hide_empty'] = 0;
$handler->display->display_options['fields']['nid']['empty_zero'] = 0;
$handler->display->display_options['fields']['nid']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['nid']['link_to_node'] = 0;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['external'] = 0;
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_label_colon'] = 1;
$handler->display->display_options['fields']['title']['element_default_classes'] = 1;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Field: Location: Latitude */
$handler->display->display_options['fields']['latitude']['id'] = 'latitude';
$handler->display->display_options['fields']['latitude']['table'] = 'location';
$handler->display->display_options['fields']['latitude']['field'] = 'latitude';
$handler->display->display_options['fields']['latitude']['label'] = '';
$handler->display->display_options['fields']['latitude']['exclude'] = TRUE;
$handler->display->display_options['fields']['latitude']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['latitude']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['latitude']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['latitude']['alter']['external'] = 0;
$handler->display->display_options['fields']['latitude']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['latitude']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['latitude']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['latitude']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['latitude']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['latitude']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['latitude']['alter']['trim'] = 0;
$handler->display->display_options['fields']['latitude']['alter']['html'] = 0;
$handler->display->display_options['fields']['latitude']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['latitude']['element_default_classes'] = 1;
$handler->display->display_options['fields']['latitude']['hide_empty'] = 0;
$handler->display->display_options['fields']['latitude']['empty_zero'] = 0;
$handler->display->display_options['fields']['latitude']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['latitude']['style'] = 'dd';
/* Field: Location: Longitude */
$handler->display->display_options['fields']['longitude']['id'] = 'longitude';
$handler->display->display_options['fields']['longitude']['table'] = 'location';
$handler->display->display_options['fields']['longitude']['field'] = 'longitude';
$handler->display->display_options['fields']['longitude']['label'] = '';
$handler->display->display_options['fields']['longitude']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['longitude']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['longitude']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['longitude']['alter']['external'] = 0;
$handler->display->display_options['fields']['longitude']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['longitude']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['longitude']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['longitude']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['longitude']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['longitude']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['longitude']['alter']['trim'] = 0;
$handler->display->display_options['fields']['longitude']['alter']['html'] = 0;
$handler->display->display_options['fields']['longitude']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['longitude']['element_default_classes'] = 1;
$handler->display->display_options['fields']['longitude']['hide_empty'] = 0;
$handler->display->display_options['fields']['longitude']['empty_zero'] = 0;
$handler->display->display_options['fields']['longitude']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['longitude']['style'] = 'dd';
/* Sort criterion: Location: Distance / Proximity */
$handler->display->display_options['sorts']['distance']['id'] = 'distance';
$handler->display->display_options['sorts']['distance']['table'] = 'location';
$handler->display->display_options['sorts']['distance']['field'] = 'distance';
/* Contextual filter: Location: Distance / Proximity */
$handler->display->display_options['arguments']['distance']['id'] = 'distance';
$handler->display->display_options['arguments']['distance']['table'] = 'location';
$handler->display->display_options['arguments']['distance']['field'] = 'distance';
$handler->display->display_options['arguments']['distance']['default_action'] = 'empty';
$handler->display->display_options['arguments']['distance']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['distance']['default_argument_skip_url'] = 0;
$handler->display->display_options['arguments']['distance']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['distance']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['distance']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['arguments']['distance']['search_units'] = 'mile';
$handler->display->display_options['arguments']['distance']['search_method'] = 'dist';
$handler->display->display_options['arguments']['distance']['type'] = 'latlon';
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = '1';
$handler->display->display_options['filters']['status']['group'] = 0;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
  'chip_shop' => 'chip_shop',
);
$handler->display->display_options['filters']['type']['group'] = 0;
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'vote/chip-shops';
/* Display: Attachment */
$handler = $view->new_display('attachment', 'Attachment', 'attachment_1');
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['displays'] = array(
  'page' => 'page',
  'default' => 0,
);
$handler->display->display_options['attachment_position'] = 'after';
$handler->display->display_options['inherit_exposed_filters'] = 1;

Status:Closed (fixed)» Active

Sorry, here's the actual errors produced:

Notice: Undefined offset: 1 in location_handler_argument_location_proximity->query() (line 129 of /var/www/vhosts/chips.deeson.net/httpdocs/sites/all/modules/contrib/location/handlers/location_handler_argument_location_proximity.inc).
Notice: Undefined offset: 1 in location_handler_argument_location_proximity->query() (line 129 of /var/www/vhosts/chips.deeson.net/httpdocs/sites/all/modules/contrib/location/handlers/location_handler_argument_location_proximity.inc).

Status:Active» Fixed

Your issue doesn't appear to be the same as the one in the original post - they are different error messages for different problems.

Also, are you sure you are using the latest dev version of location 7.x-3.x-dev?
Have you modified it in any way?

The line number in your errors does not match up with what is in the current version.

If you try with an unmodified latest version of location and still have the problem it would be best to open a new issue seeing as this one is for a slightly different issue and is fixed and closed.

Thanks.

Status:Fixed» Closed (fixed)

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