Hello

I have installed the module and created the field Address into the user content.

I can see all the inpouts.

- I have changed the field presentation to: address autocomplete w Google Maps
- I have created the api places and maps.
- I have enabled
- I have inserted the api key into the settings.

Im getting this error when i load the form and the autocomplete doesnt appear:

placesApiAutocomplete.js?q8g247:61 Uncaught TypeError: Cannot convert undefined or null to object
at Function.values ()
at initiateAutocomplete (placesApiAutocomplete.js?q8g247:61)
at Object.success (placesApiAutocomplete.js?q8g247:22)
at c (jquery.min.js?v=3.4.1:2)
at Object.fireWith [as resolveWith] (jquery.min.js?v=3.4.1:2)
at l (jquery.min.js?v=3.4.1:2)
at HTMLScriptElement.i (jquery.min.js?v=3.4.1:2)
at HTMLScriptElement.dispatch (jquery.min.js?v=3.4.1:2)
at HTMLScriptElement.v.handle (jquery.min.js?v=3.4.1:2)

The error comes from this line:

// Resolve conflict when allowed countries is an object not an array
var allowedCountries = ($.isArray(drupalSettings.addressAutocomplete.availableCountries) ? drupalSettings.addressAutocomplete.availableCountries : Object.values(drupalSettings.addressAutocomplete.availableCountries));

Any help?

CommentFileSizeAuthor
#2 3125859-2.patch2.26 KBdrugan

Comments

lucasvm created an issue. See original summary.

drugan’s picture

Category: Support request » Bug report
StatusFileSize
new2.26 KB

  • drugan committed a6d7167 on 8.x-1.x
    Issue #3125859 by drugan: Unable to get the autocomplete working in...
drugan’s picture

Status: Active » Fixed

Please, feel free to reopen this issue if still experience that.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.