Closed (fixed)
Project:
Location
Version:
5.x-2.7
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2007 at 23:38 UTC
Updated:
7 Nov 2007 at 05:20 UTC
Hey there,
I'm trying to load a user's city and state into a custom user profile page using
print $user->location['CITY'];
print $user->location['PROVINCE'];
For some reason, this is only returning old city and state data. If I make a change to the user's location, the changes are not reflected in the user profile. I have checked the locations table in the database, and it does seem to be creating a record every time I edit the user's location. Any ideas on how I can fix this?
My setup is:
Drupal 5.1
PHP 5.2
location 5.x-2.7
thanks in advance,
ash
Comments
Comment #1
ashtronaut commentedI found the solution.
Apparently this is not a location module issue, but a gmap issue. Anytime the user's address was updated, the gmap module added a record to the location table with a 0 latitude and a 0 longitude. Thus when the data was called from the location array, it would be 0 or null. The latest version of gmap fixes this bug. I am surprised that this wasn't a well known issue, but then again I was running on an older version of gmap. . . . oh well. . . lesson learned.
link to the gmap issue:
http://drupal.org/node/138942
ash
Comment #2
ashtronaut commentedThis thread will also help people with this problem. . . .
http://drupal.org/node/187197#comment-619902