Installed modules:
Addressfield 7.x-1.0-beta5
Geocoder 7.x-1.x-dev
Geofield 7.x-1.2
Geofield Map 7.x-1.1
Steps to repeat:
1. Install above modules
2. Add new address field to a content type
3. Add new geofield to content type. Set values:
- Geocode from field: Choose the address field created in step 2
- Geocoder: Google Geocoder
4. Edit content type display settings and set the format for the geofield to Geofield Map
5. Create new node and leave the address field blank
Expected Results:
Node should show only fields that have been filled in, and should not display any map output since all address fields were left blank.
Actual Results:
- Node displays a Google map with a pin at coordinates 37.0902 , -95.7129.
- An entry is created in field_data_[geofield_name] with these coordinates
Notes:
Logic inside geocoder_widget_get_field_value
retrieves source values but doesn't seem to do enough checking to see whether the fields are blank, and geocodes anyway.
Similar issues:
https://drupal.org/node/1592096
Thanks in advance!
Comments
Comment #1
vinmassaro CreditAttribution: vinmassaro commentedComment #2
Simon Georges CreditAttribution: Simon Georges commentedDid you try with the latest 7.x-1.x-dev version?
Comment #3
vinmassaro CreditAttribution: vinmassaro commentedStill have the issue with 7.x-1.x-dev so I'm reopening. Following my steps above result in it geocoding to Afghanistan, 33.9391, 67.71.
Comment #4
Simon Georges CreditAttribution: Simon Georges commentedOk, thanks for the feedback!
Comment #5
Khalor CreditAttribution: Khalor commented#2114183: Don't geocode for location data if the addressfield is empty resolved this for addressfields by adding logic in each individual handler. So far as I can tell it's still an issue for generic fields though.
Comment #6
Pol