Hi, this module works great for me aside from one bug I keep getting:

Each user has:

  • an Address field (postal address), and
  • a Location field (geofield) which geocodes from the Address field

When a new user registers, they enter their address and the view tab of their user account shows their location correctly on a map. The user's coordinates are displayed. The GMap page (/map/user) also displays the user at their correct location. All fine.

But when a user updates their address, even just a small detail, and saves, all Location field data is lost. If they attempt to re-enter the old address, still no location is shown. Latitude and Longitude are empty.

As admin, I've tried checking 'Re-geocode' and 'Delete' in the users' accounts many times, but I can't get anything to re-appear in the location.

Has anyone else come across this issue?

Comments

bluesman2014 created an issue.

bluesman2014’s picture

Checking the database, the following is happening:

When a new user enters their address for the first time, the geofield geocodes the user's location correctly from the address field.

When a user updates their address, the old geofield data is deleted, but no new geofield data is created. Looking at drup_location in the database, there is no new entry when updating a user account.

Any clues here?

bluesman2014’s picture

After having played around with a few settings, I discovered the following:

I was using a Google API key, but if I set the Google API Authorization Method to 'None' (in /admin/config/content/geocoder), the logged in user is able to modify their address and have it re-geocode correctly.

If I try to do exactly the same thing as admin however (i.e. modify a user's address and save it), it fails to re-geocode at all.

Weird but the issue is now 95% solved.