When emptying user coordinate fields on a node that was previously saved with user supplied coordinates, geocoding is not triggered and the previously submitted coordinates persist. Relying on the logic in location_calc_difference() is not sufficient as it does not check for changes in the $location['locpick'] fields. I thought this might have been reported by now but I couldn't find anything in the queue.
Not sure if the additional logic applied to location_save() here would be better served in location_calc_difference(). Perhaps someone with a more intimate knowledge of the module can provide guidance or a more elegant solution.
Patch created against 5.x-3.x-dev. May be an issue for 6.x as well.
| Comment | File | Size | Author |
|---|---|---|---|
| location_empty_user_coords.patch | 903 bytes | aether |
Comments
Comment #1
yesct commentedPlease check to see if this is still a problem in the new release. If it is, reply with a new summary and set the status to .. probably needs work as it will need to be rerolled against the new versions.
Comment #2
yesct commentedis #855298: Doesn't re-geocode if users remove the coordinates a duplicate of this issue?
Comment #3
gregglesCertainly one is a duplicate of the other. I think the patch here isn't as generalized as mine so I guess I would mark this a duplicate of that.
Comment #4
gstout commentedFYI for me location is not filling in Lat and Long on new users either.
Comment #5
greggles@gstout that seems like a different problem.
Comment #6
yesct commentedI think gstout opened this issue #856244: change instructions to make it obvious how to get Location to populate latitude and longitude for a user :) Thanks gstout.
Comment #7
ankur commentedI'm not sure if this is still an issue. I tried this more recently (wiping out older, user-entered coordinates) and I remember it triggering a re-geocoding of the location.