WordPress.org

Ready to get started?Download WordPress

Forums

WP Flexible Map
[resolved] "The Google Maps API server rejected your request" (8 posts)

  1. Hassan
    Member
    Posted 1 year ago #

    "The Google Maps API server rejected your request. The "sensor" parameter specified in the request must be set to either "true" or "false"."

    I get the above error whenever I try to view the page that contains the map when I'm NOT signed in. If I'm signed in, it displays fine though. I am using this shortcode:

    [flexiblemap id="office_map" width="100%" height="350" maptype="hybrid" zoom="17" center="15.596158,32.571333" icon="http://www.example.com/blog/wp-content/themes/mytheme/imgs/icon.png" title="Site Title" description="Some Description"]

    http://wordpress.org/extend/plugins/wp-flexible-map/

  2. webaware
    Member
    Plugin Author

    Posted 1 year ago #

    G'day Hassan, I used your shortcode sample in a test post and didn't get that error. It sounds like something on your website is messing with the Google Maps API URL, or maybe you have another map plugin installed and that's loading the API URL incorrectly.

    Can you provide a link to your website where I can see this? If you don't want to make the link public, please send it to me via my contact page.

    cheers,
    Ross

  3. Hassan
    Member
    Posted 1 year ago #

    @webaware, thank you for the response.

    I don't have another maps plugin installed. However, I did more testing and it appears that this error is displaying only when I'm not signed in as an admin. Which means visitors and users who are not admins are not able to see the map and get this error instead.
    Did you try this when not signed in?

    My site is installed in a directory, not root. Could this have anything to do with the error?

  4. webaware
    Member
    Plugin Author

    Posted 1 year ago #

    G'day Hassan,

    This sounds eerily like another thread here. It could be that your theme is messing up the scripts from my plugin. See this thread for details.

    http://wordpress.org/support/topic/error-on-update-api-request-rejected

    cheers,
    Ross

  5. webaware
    Member
    Plugin Author

    Posted 1 year ago #

    G'day Hassan,

    I got your site link via email, and something on your site is definitely stripping all the query arguments off both script and stylesheet links. This is bad! It's probably your theme, which you can confirm by switching to twentytwelve temporarily and testing your page with the map.

    You need to find out what is doing that and stopping it. I suspect it's someone's idea of increasing security by removing version numbers, but it's a bad idea and as you can see, it breaks things. Maybe talk to whoever wrote your theme, or check to see if one of your other plugins is doing it -- maybe a so-called "security" plugin for WordPress (if you have one of those, disable it and check again).

    A quick search tells me that the "security" plugin Better WP Security does this. If you have that plugin, toss it away, it's breaking things.

    cheers,
    Ross

  6. Hassan
    Member
    Posted 1 year ago #

    Ross,

    Thank you for taking the time to look into this issue, even tough it appears to not be directly caused by your plugin.

    It indeed was that "security" plugin you mentioned that was the source of all this mess. Specifically, the option "Display random version number to all non-administrative users" in the plugin options. By disabling that option, I managed to get my map back (yay!). This explains why I could see the map only if I'm signed in as admin, but get the error if I'm not signed in.

    You did not only help me solve this, but you made me reconsider my "security measures" regarding WordPress.

    Thank you heaps, mate!

  7. webaware
    Member
    Plugin Author

    Posted 1 year ago #

    No worries, glad it was sorted out. I've added a new FAQ for this problem :)

    cheers,
    Ross

  8. tkendrickweb
    Member
    Posted 1 year ago #

    Thanks for this post. I had the same issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic