Store Locator Plus® for WordPress Forums Store Locator Plus Google Maps API Warning Error no-api-keys Map Blank but search form is good

  • This topic has 8 replies, 3 voices, and was last updated 8 years ago by Cici.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #40407
    Michael
    Participant

    Just updated my plugins and WordPress this morning. The map is showing as blank now but the search form is showing just fine.

    Website is http://www.roadworksmfg.com and the page is http://www.roadworksmfg.com/dealer-map/

    When I went to Firefox and used the Firebug console I received the following error when I refreshed the page:

    Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys

    What do I need to do to fix this issue?

    Thanks

    #40415
    Cici
    Keymaster

    If you are receiving that warning then there is another plugin or possibly your theme that is also trying to Load Google maps and that will break SLP Map

    Also if any Plugin or theme is forcing their own version of jquery, or a lower than 1.11 version , that is outside of the WP rules  and best practices..

    perhaps updating to WP 4.5 brought that to light and they may have made those conflicts more apparent.I believe your issue is with this theme:

    Inspect the Console and the error and it points to your Nivoslider:

    http://www.roadworksmfg.com/wp-content/plugins/ml-slider/assets/sliders/nivoslider/jquery.nivo.slider.pack.js?ver=3.3.6

     

    #40417
    Lance Cleveland
    Keymaster

    The Google Maps No API warning is a non-issue.  You can get an API key and put it in under the General / Server tab but it is not necessary.

    One of your scripts loading on the page is disabling all web console output.  Disabling the console logging is a neat way to hide errors and warnings in code, but it is stops virtually all problem debugging when you find some JavaScript is not loading, like the Google Maps loader.    Which is exactly what is happening on your site.

    Something in JavaScript is breaking.   Unfortunately one of your plugins or themes decided it is better to hide JavaScript errors which means we have no way of telling exactly what broke.    Maybe a SLP script, but probably not.

    If you can figure out what plugin (or WP Theme option, or CDN / cache / minification process)  is doing that we can probably help you figure out what script is breaking in WP 4.5.

    SLP is fully tested in WP 4.5.    I have contributed to 4.5 (and 4.4) WordPress Core and have been testing the 4.5 release for nearly  4 months through each-and-every iteration while developing updates for my plugin.

    If you don’t have a way to figure out which plugin is disabling logging you’ll need to do the one-at-a-time deactivation until you see real console logs in JavaScript and/or the SLP map re-appears.

    #40426
    Michael
    Participant

    Thanks for the replies. I am trying to track down the culprit that is not allowing Javascript errors logging. Here are the steps I have done so far.

    1. Deactivated all plugins. Then refreshed my Firefox browser. No change in the content of the console window.
    2. Reactivated plugins.
    3. Deactivated our Cloudflare CDN. All that did was make it so our site would not show up because of a DNS error.
    4. Reactivated  Cloudflare CDN. Website showing up again, but still not sure if CDN is the offender.
    5. Changed from the child theme I was using to the 2015 theme. The map shows up then but Javascript logging does not.
    6. Changed to the main theme that my child theme is based on. Map does not work.

    I have to assume that something in my underlying theme is breaking the map functionality, and something in the CDN is breaking javascript logging.

    Does my logic sound correct on this given the tests I performed?

    The last thing I think I need to do is contact my hosting provider and find out how to disable my CDN without breaking my site.

    I will let you know when I have Javascript logging working.

    #40440
    Michael
    Participant

    I am at a stand still on this.

    1. I deactivated our CDN.
    2. I deactivated all plugins on site.
    3. I switched to 2015 theme.

    After doing all of that when I look at our site and the map page in particular on Firebug I still only see the “Google Maps No API warning”.

    What am I doing wrong as far as allowing javascript logging to happen in Firebug?
    What else can I do other than the steps above?

    Thanks.

    #40450
    Cici
    Keymaster

    Hi Michael..,

    Lance is out at the moment.   There have been a lot of conflicts posted about themes and plugins breaking because they did not update to test with 4.5.

    Lance found this one:

    https://make.wordpress.org/core/2016/02/17/backbone-and-underscore-updated-to-latest-versions/

    Check to see if any of your plugins are using Backbone or Underscore.

    Did you check the WP 4.5 support forum  suggestions and info?

     

    #40452
    Michael
    Participant

    Hi Cici,

    I went ahead and installed my live site on localhost so I could troubleshoot there and know for sure that no CDN is causing issues.

    I switched to the 2015 Theme and turned off all plugins except Store Locator Plus and Pro Pac.

    The map works in 2015 theme and when I run firebug I get the same non-issue single line warning message about the Google Maps API.

    Then I switched back to my base theme and my child theme and the Map does not work in either, BUT I still only get the single line warning about the Google Maps API.

    Can I assume this means that the base theme of my child theme has javascript error logging turned off? Can’t do anything at all about the Store Locator Plus until I can debug.

    Thanks Much for your help! You all are awesome.

    Scott

    #40464
    Cici
    Keymaster

    Hi Michael,

    No problem, I am monitoring the forums closely , especially whenever there is a major update in WP…well you know the saying..shit happens.. and the Map is right there in your face, so lots of people assume it is SLP.   See the WP 4.5 masterlist issues posts, they mention some themes with issues so you know there is more than likely lots more.

    You can assume that if SLP works when you use 2015  theme  and then it doesn’t work with your  themes turned on that it is the theme causing you issues.  If it is a parent theme causing the issue, I suggest you contact the theme author, that is what WP is suggesting in  their forums.  They even have a few known conflicts in there  You might want to ask them if they have anything in there that is forcing Javascript as well.

    There is a Forceload Javascript setting and a turn off SLp maps under General/User Interface.   Check to make sure that is not checked, The setting is there for the few bad themes that are not using the standard best practices…it is not suggested you use that setting ..if you need to use that setting now  or if you have used that in the past,  then your theme is not friendly and doesn’t play well with others.  there is some info about Map issues that might help you under the Troubleshooting section

    As mentioned by Lance  the No Google Map API is just a warning.

    #40465
    Cici
    Keymaster

    P.S. The warning about the Google Maps API is because Google wants everyone to use it on their sites.   That doesn’t indicate SLP doesn’t use it, (we do) or that you HAVE to have one , at least for the time being until Google makes it an issue. .  I should have read your query and your site more carefully,  if you see a message about Multiple Maps then another plugin or theme is doing something with the map in background as well.

    Sorry if I added my   confusion to the mix… the real issue you are having , the map not loading with your theme enabled is totally different then the google warning (which is just a warning…you can get a free API key, we have tutorials on that as well)

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.