The push from the Google geocoder widget to an Address field is broken since a recent change in the Address module (#2689089: Define a form element type "address").
Additionally I found a second bug related to the explicite_actions_address_field. In the module schema the field is defined as a string, and this causes the following comparison to fail in geolocation-widget-googlegeocoder.js becaue the string '0' is not equivalent to false.
if (!drupalSettings.geolocation.widgetSettings[map.id].addressFieldExpliciteActions) {
Drupal.geolocation.geocoderWidget.setHiddenAddressFieldByReverseLocation(location, map);
}
I've rolled a patch that fixes both issues.
Comments
Comment #2
peacog commentedHere's the patch.
Comment #3
christianadamski commentedComment #4
juliencarnot commentedTested the patch, it solves the regression. Marking RTBC.
Comment #5
rakesh.nimje84@gmail.com commentedYes. The patch is working.
Thanks for patch.
Comment #6
thedut commentedHello,
I confirm the path solves this issue for me.
FYI , on my drupal 8 site, only the second part of the patch was enought :
Comment #7
flodevelop commentedHello,
I think you need to reinstall the module to apply the update of the explicite_actions_address_field schema.
If you've already build views you could potentially lose it ?
Maybe a hook update table would be useful for those who are going to update this module in the next version.
Or you could add a parseInt in the js condition :
Best
Comment #8
christianadamski commentedRemoved the schema change, added some code fixes.
Comment #10
christianadamski commentedComment #11
thedut commentedThanks for the information on #7, I'm going to reinstall the geolocation module.
Comment #12
christianadamski commented@thedut,
I did not commit the schema change, so you do not have to reinstall with current -dev
Comment #13
adamspe commentedThis patch did not work for me. The jQuery find of ('.details-wrapper') after AJAX replacement fails to find anything (relies on how address formats its widget).
I manually updated it (temporarily) like:
And then it works (simply using the original addressField element to find the nested input elements for the address parts).
I can't say if this is entirely appropriate but my address field does NOT contain a nested element with the class details-wrapper on it and cannot find that string anywhere within its source.
The version of the address module I have installed is the current latest, 8.x-1.0-rc4
Comment #15
florin_simion commentedThe push option is working well on a content type but Is not when I try to use it with commerce for the address field. Customizable at this path admin/config/people/profiles/manage/customer/fields
Geolocation 8.x-1.11
Drupal 8.5.5