This is a map loading tag. Are you using our IDX with your Google maps key and using that same key on your theme? This could be causing the key to be loading in twice and calling the Google Maps twice on our plugin.
Hi @jordantorres,
Thanks for the reply. Yes, I am using your IDX with a new Google Maps API key, but don’t use Google Maps anywhere else and there is no other entry for the maps API key. The theme does not load Google Maps, or use the API key. It’s a default WP theme.
I am using the plugin’s Current Listings widget on every page, so I checked a page that doesn’t use any IDX elements in the main content area to see if that was causing the warning, but it still occurred on pages with only the widget.
I’ve tried the usual: purging the browser and server cache, but the warning persists. I’m not getting the error that Firefox shows when Google Maps loads twice, just the warning noted in the original post.
Are you able to send us the page to your website and we can then check the console for this warning. Send that over to [email protected]. I do see something here on stack overflow with this fix: https://stackoverflow.com/questions/75179573/how-to-fix-loading-the-google-maps-javascript-api-without-a-callback-is-not-sup
I just sent the URL to the site.
That Stack link is promising.
Diverse Solutions’ Tech Support is forwarding the issue to their developers, but they aren’t sure if there will be a fix released since the issue is a warning and not an error.
A fix that works for me, based on the Slack post that @jordantorres posted above, is to change line 32 of /wp-content/plugins/dsidxpress/globals.php from this:
wp_enqueue_script('dsidxpress_google_maps_geocode_api', '//maps.googleapis.com/maps/api/js?key='.DSIDXPRESS_GOOGLEMAP_API_KEY.'&libraries=drawing,geometry');
to this:
wp_enqueue_script('dsidxpress_google_maps_geocode_api', '//maps.googleapis.com/maps/api/js?key='.DSIDXPRESS_GOOGLEMAP_API_KEY.'&libraries=drawing,geometry&callback=Function.prototype');
I applied the fix to the site, the warning is gone, and Google Maps is still working.
Note that due to the conditional in the globals.php file, you’ll have to have your own, active, Google Maps API Key saved in IDX > More Options > Maps > Google Maps API Key in order for the variable that adds the callback to be added to the query string.