Google Maps Server Rejected your request (Proposed fix)
-
Hello,
I found a bug and a solution for your plugin. On some browsers you’ll get an error like this:
The Google Maps API server rejected your request. The “sensor”
parameter specified in the request must be set to either “true” or
“false”.The problem is wordpress maps your amperand signs as #038. Google can’t understand the request and pops the error. I have the following fix in geo-my-wp.php where I just add a filter. Fix is in bold. Please consider adding it for future releases ?? :
//if( is_multisite() ) $wppl_site_options = get_site_option('wppl_site_options'); <strong>add_filter('clean_url', 'so_handle_038', 99, 3); function so_handle_038($url, $original_url, $_context) { if (strstr($url, "googleapis.com") !== false) { $url = str_replace("&", "&", $url); // or $url = $original_url } return $url; }</strong> // REGISTER STYLESHEET AND JAVASCRIPTS IN THE FRONT END// function gmw_register_cssjs_front_end() {
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Google Maps Server Rejected your request (Proposed fix)’ is closed to new replies.