This issue is discussed also in #411360.
When location tries to calculate the latitude & longitude on a location is trying first to geocode with location_latlon_exact() function. This function invoke a web service like Google Maps to obtain the latitude & longitude. If that fails Location is trying to obtain geodata using the postal code through location_get_postalcode_data() function.
The location_get_postalcode_data() call the country-specific include PHP file to have access to that country postal code geodata retrieval.
I found that the country-specific file is not loaded when Location tries to call the function. The attached patch simply adds a call to the location_load_country($location['country']); country loader function.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | location_load_country_before_get_postalcode_data.patch | 612 bytes | claudiu.cristea |
| location_load_country_before_get_postalcode_data.patch | 734 bytes | claudiu.cristea |
Comments
Comment #1
claudiu.cristeaComment #2
claudiu.cristeaThe correct patch is here.
In the above I left a helper function...
Comment #3
bdragon commented*facepalm*
Good call, thanks!
http://drupal.org/cvs?commit=235064
http://drupal.org/cvs?commit=235066
http://drupal.org/cvs?commit=235070