Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#3 | location-proximity_arg_undefined_index-1051518-3.patch | 1.74 KB | rooby |
Comments
Comment #1
bluegray CreditAttribution: bluegray commentedSame 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
Comment #2
vedariy CreditAttribution: vedariy commentedsubscribed
Comment #3
rooby CreditAttribution: rooby commentedIt 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.
Comment #4
paulgemini CreditAttribution: paulgemini commentedThe patch works for me!
Comment #5
rooby CreditAttribution: rooby commentedCommitted to 6 & 7 branches.
http://drupalcode.org/project/location.git/commit/401f99a
http://drupalcode.org/project/location.git/commit/d7d473a
http://drupalcode.org/project/location.git/commit/31abd7a
Comment #7
heylookalive CreditAttribution: heylookalive commentedHi! This bug is still occurring for me, and am running latest version of the module (Drupal 7).
Here's a view export:
Comment #8
heylookalive CreditAttribution: heylookalive commentedSorry, here's the actual errors produced:
Comment #9
rooby CreditAttribution: rooby commentedYour 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.