• Resolved b2bwebteam

    (@b2bwebteam)


    The browser key is repeatedly having an issue saying that it is not working and it’s causing the map to not work at all. No matter how many times I redo my browser key, it won’t work at all for this site. Can anybody offer any advice as the client is chasing about their map not working.

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    There are different problem that show up in the browser console ( F12 ).

    Are you using another Google maps plugin? Try to disable it, and also enable the compatiblity mode on the WPSL settings page ( tools section ).

    Thread Starter b2bwebteam

    (@b2bwebteam)

    No other google maps plugin is in use, compatibility mode is enabled.

    The browser console shows me the following;

    Both the server key and the browser key have been created following the steps outlined during setup yet the browser key is having issues and saying the following;

    There’s a problem with the provided browser key.

    You will have to open the browser console ( ctrl shift k in Firefox, or ctrl shift j in Chrome ) to see the error details returned by the Google Maps API.

    The error itself includes a link explaining the problem in more detail.

    Common API errors are also covered in the troubleshooting section.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    When I check the HTML source ( ctrl + U ), then I see this.

    <script type=’text/javascript’ src=’https://maps.google.com/maps/api/js’></script&gt;

    After /js should be ?key= and several other parameters, so there’s a script from either another plugin, or something on your server that strips away the parameters.

    If your using a security plugin then try to disable that, if not, then ask your host if they are maybe running code that would do this.

    Also in the HTML source it shows your loading jQuery 3.x, which will likely cause issues since WP itself ships with 1.12. On line 12 of the code it also does make another call to a Google Maps library script, which can also cause issues.

    Maybe it’s included from you theme?

    Check if your theme is including another reference to Google Maps.

    In my case, Divi template was including one line without the API key so It crashes ACF Location Input in backend.

    • This reply was modified 6 years, 6 months ago by vivazzio.
    Thread Starter b2bwebteam

    (@b2bwebteam)

    I have tried removing the <script> tag to stop it showing that there are multiple tags being used, but doing this now displays that there are no API keys in use. I followed this up with Google Maps support and they have done some testing and advised me back here to say its a plugin issue as everything is set correctly on their end

    Plugin Author Tijmen Smit

    (@tijmensmit)

    Your loading the Google Maps script ( and all other scripts ) without their parameters.

    It look like this in the HTML source <script type=’text/javascript’ src=’https://maps.google.com/maps/api/js’></script&gt; there should be a ?key=xxxx parameter.

    Check if you have a security / optimization plugin running that remove script parameters, or custom code in the functions.php.

    There’s also a ‘js:141 You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.’ which won’t help, but you can likely fix by enabling the compatibility mode on the WPSL settings page ( tools section ).

    You can see the errors in the browser console ( F12 ).

    • This reply was modified 6 years, 1 month ago by Tijmen Smit.
    Thread Starter b2bwebteam

    (@b2bwebteam)

    I can see that parameter when I look for it, it all appears to be set correctly

    I don’t know what I’m looking for with regards to things removing script parameters, I know that there is a lot of security functionality in place on the site as it is required to be extremely secure so it is possible that something could be in place, but I cannot tell for certain

    Compatability mode is enabled and was when I sent the last message across.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    The duplicate script error isn’t always a problem. The store locator loads fine for me now and searches return results, so I wouldn’t spend time on trying to resolve the duplicate script warning unless it stops working.

    It all works fine for you as well now?

    Thread Starter b2bwebteam

    (@b2bwebteam)

    Hi Tijmen, apologies, the reply never came through.

    It all works fine now yes, I managed to find where the issue was being caused from and resolved this.

    So it would be great if you coul’d share with us how you fixed this as to help other people like myself and yourself to solve this problem.
    What was it down to plz??

    Plugin Author Tijmen Smit

    (@tijmensmit)

    @cloud9beyond what errors show up on the wpsl setting page after you clicked the ‘show response’ button? Also check for errors in the browser console ( F12 ), and make sure you follow all the steps described here.

    Thread Starter b2bwebteam

    (@b2bwebteam)

    @cloud9beyond I moved the server it was hosted on and managed to find more hidden files where the old API key was stored

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘API Browser Key not working’ is closed to new replies.