Hi,
I put my site live and the field Google map doesnt work anymore.
I have this message :
Petit problème… Une erreur s’est produite
Google Maps ne s’est pas chargé correctement sur cette page. Pour plus d’informations techniques sur cette erreur, veuillez consulter la console JavaScript.
When i check the console, this message appear : js?libraries=places&ver=3&callback:34 Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error_.kb @ js?libraries=places&ver=3&callback:34
util.js:208 Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
Is there an update for this ?
I have ACF PRO Version 5.4.6 and WordPress Version 4.6.1
Regards
Amaury
James form ACF support gave me the solution :
https://www.advancedcustomfields.com/resources/acfsettings/
Add this on your function.php and replace XXX by your Google API KEY https://developers.google.com/maps/documentation/javascript/get-api-key :
function my_acf_init() {
acf_update_setting(‘show_admin’, false);
acf_update_setting(‘google_api_key’, ‘xxx’);
}
add_action(‘acf/init’, ‘my_acf_init’);
Get the same error!
JS Console reports the same message.
- Added the code to the function.php in my child theme
- Replaced xxx with key for Google Maps JavaScript API
I use ACF 5.5.14 with WP 4.7.5
Thanks for a hint!
Christian