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.

CommentFileSizeAuthor
location_empty_user_coords.patch903 bytesaether

Comments

yesct’s picture

Status: Needs work » Postponed (maintainer needs more info)

Please 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.

yesct’s picture

greggles’s picture

Certainly 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.

gstout’s picture

FYI for me location is not filling in Lat and Long on new users either.

greggles’s picture

@gstout that seems like a different problem.

yesct’s picture

Status: Postponed (maintainer needs more info) » Active
ankur’s picture

Status: Active » Closed (fixed)

I'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.