Tagged: acf, advanced custom fields, API, Google, google maps
-
AuthorPosts
-
June 4, 2018 at 8:55 pm #966788
You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors. TypeError: a is undefined[Learn More] Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys Google Maps JavaScript API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-version Google Maps JavaScript API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
Hello,
I’ve created a custom post type that uses Advanced Custom Fields’ Google Maps field type. Enfold’s inclusion of Google Maps API is conflicting with theirs, and I’m unable to use the map in the Edit Post view. How can I get around this?
June 4, 2018 at 8:59 pm #966791I believe the problem may lie in one of the following files:
wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/google_maps/google_maps.php
wp-content/themes/enfold/framework/js/conditional_load/avia_google_maps_api.jsJune 6, 2018 at 3:02 pm #967879Hi,
Thank you for using Enfold.
If you do not need Google Maps, you can manually deactivate it in Enfold option page -> Performance -> Disable Template Builder Elements -> Manually manage loaded elements and disable the element.
Or delete the folderenfold\config-templatebuilder\avia-shortcodes\google_maps\.
Best regards,
GünterJune 6, 2018 at 3:33 pm #967902Hello Günter,
For this site, we still need Google Maps. Is it possible to prevent it loading for a specific custom post type?
June 6, 2018 at 3:50 pm #967914Hi,
In file enfold\framework\php\class-gmaps.php line line 143 there is a filter:
apply_filters( ‘avf_load_google_map_api_prohibited’, false );
returning true does not enqueue the script avia_google_maps_front.js which lazy loads avia_google_maps_api.js.
Hope this helps you. If you are not familiar with filters, let us know.
Best regards,
GünterMay 10, 2023 at 3:59 pm #1407004Hi,
In view of the fact that you can still be warned, I would very much like to deactivate Google Maps in enfold.
However, I can’t find a way to: Enfold option page -> Performance -> Disable Template Builder Elements (enfold v. 5.61)
Where can I find the setting?
Best regards,
solfMay 13, 2023 at 9:36 pm #1407305Hi,
Please go to Enfold Theme Options ▸ Google Services ▸ Google Maps ▸ Enable Google Maps on your site ▸ Disable Google Maps
We will close this thread as it is quite out-of-date (2018) if you have further questions please open a new thread so we can assist.Best regards,
Mike -
AuthorPosts
- The topic ‘Multiple Google Maps JavaScript API inclusions error in custom post type’ is closed to new replies.