google is not defined ( 404 )
-
I’m getting a 404 google is not defined
The generated URL is:
https://maps.google.com/maps/api/js/?language=en®ion=ca&key=my_key&libraries=places&v=3.36&ver=2.2.231If I add the following:
add_filter( 'wpsl_gmap_api_params', 'custom_gmap_api_params' ); function custom_gmap_api_params( $api_params ) { $api_params = $api_params .'&key=TEST'; return $api_params; }
I can confirm that the query string is modified, and this is the path from the plugin.
I looked into the API path and it should be.
https://maps.googleapis.com/maps/api/js and not https://maps.google.com/maps/api/js/
Change
google.com
togoogleapis.com
and remove the trailing slash afterjs/
This fix needs to be applied to the
class-admin.php
Loog for and change:
wp_enqueue_script( ‘wpsl-gmap’, ( ‘//maps.google.com/maps/api/js/’ . wpsl_get_gmap_api_params( ‘browser_key’ ) ), false, WPSL_VERSION_NUM, true );to
wp_enqueue_script( 'wpsl-gmap', ( '//maps.googleapis.com/maps/api/js' . wpsl_get_gmap_api_params( 'browser_key' ) ), false, WPSL_VERSION_NUM, true );
Hope this can be updated soon! ??
- The topic ‘google is not defined ( 404 )’ is closed to new replies.