Gray map or blank map and/or search does not work

JavaScript Problems

Many times we hear that an update to SLP broke “everything” Upon asking  for clarification  we find out that they also updated WP and/or  other plugins or that they didn’t update other plugins to work with the current version of WP.  WordPress explains how to  use your browser to diagnose javasciprt error

Issues with the JavaScript part of the plugin usually manifest themselves by showing the search form but either a blank map, a map that is all gray, or a map that appears but search does not work. To identify what is causing your issue use the Firebug add-on with Firefox or any Browser developer tools (see above how to diagnose with browser).

The WordPress Store Locator Plus map rendering is managed by the slp.js JavaScript file.  It sets up the communication with the built-in WordPress AJAX handler, admin-ajax.   Your server must be setup to allow the built-in WordPress AJAX handler to execute.  Additionally, ANY PLUGIN or THEME that is breaking javascript will break SLP functionality. This is rarely an issue with the SLP plugin.

Common errors or issues:

The PHP JavaScript connector did not load

We have come across this error on several installations. The short answer to this problem is that something in the WordPress installation prevented the Store Locator Plus JavaScript component from loading. This means that the map system cannot communicate with Google. This prevents the map from appearing and search results from working properly on your locations page.

Here are some issues we’ve come across that cause this to happen:

    • PHP version is < 5.3, this generates an error message that you will not see in the browser. Any error message will prevent the JavaScript PHP file from loading. SLP will not work with versions lower then PHP 5.3.
    • PHP Error Reporting Enabled, if PHP error reporting is enabled and ANY PLUGIN has bugs, uses deprecated WordPress functions, or uses deprecated PHP functions they will generate an error message. This error message can be hidden in the browser if the error happens in something that is creating page header information. This will also break the page loading process and prevent the JavaScript PHP from loading.
    • Plugin Errors, any plugin that does not load properly and does ANYTHING with page header output will break and thus cause a domino effect prevent the Store Locator Plus PHP JavaScript component from loading.

In many cases the cause of the maps not loading is because our PHP JavaScript file could not load. We can often detect this and pop-up the “PHP JavaScript connector did not load” warning. However we cannot catch all errors. Why good Javascript is critical.

One of the best tools for searching for errors in the HTML page headers is to use Firefox with the Firebug plugin or any browser developer tool. Turn on the console and check the responses tab under console for any errors. We have resolved many client installation and map problems with this plugin. More often than not we are finding errors in other plugins, themes, or server/site  configuration settings.

The PHP JavaScript page header is a critical part of a working Store Locator Plus installation. Since it loads very late in the page creation process it is susceptible to failures from almost anything else you may be loading on the page or your WordPress site. The the map is not loading and you are receiving this message get some page debugging/tracking tools like Firebug and isolate any plugins that are generating coding/output errors.

Update your WordPress environment and  review  the WordPress changes.

Review the suggested new and improved requirements as of 4.9. 

  • Update PhP to 7 or higher
  • Update MySQL to 5.6 or higher
  • Site move to HTTPS 

2017 is going to be the year that you’re going to see features in WordPress which require hosts to have HTTPS available. Just as JavaScript is a  necessity for smoother user experiences and  updated PHP versions are critical for performance, SSL just makes sense as the next hurdle our users are going to face.  Google also weighs SSL as a search engine ranking factor and have begun flagging unencrypted sites in Chrome.

Search and results not loading

AJAX Blocked

It is common for web hosts and system administrators to disable the built-in WordPress AJAX processing.   Store Locator Plus requires AJAX to be enabled.   This typically manifests itself with the AJAX call to the admin-ajax.php script not executing.

You can test this by directly surfing to the admin-ajax script on your server with a URL similar to this:

/wp-admin/admin-ajax.php?action=csl_ajax_onload&addressInput=&ignore_radius=1

This should return a JSON response showing curly braces that start with {“success”:true,…

If it comes back with nothing, or a warning/error about being blocked, your AJAX security is not set properly.  Check you web server log files and talk to your system admin for assistance on configuring access to WordPress AJAX scripts.

Forceload Javascript Warning

Store Locator Plus has a checkbox under the General /User Interface tab called Force Load Javascript

Having this checked forces the JavaScript for Store Locator Plus to load in the header of EVERY page on your site. This can slow down your site and will disable various Store Locator Plus features. If you need to do this to make SLP work you should ask your theme author to add proper wp_footer() support to their code, or switch to a theme that behaves properly.
Continue reading “Forceload Javascript Warning”

Q: My Map Is Not Showing

You activated the Store Locator Plus base plug-in and followed all the instructions but when you visit your locator page nothing is there.

Here are some common reasons why the map will not appear:

Did you obtain a Google MAP API key?

As of June 22, 2016 Goggle requires all new domains, sites to obtain a key. There are many options based on how often your locations are queried. There are instructions in the SLP documentation site , in the SLP User Interface under INFO.
Continue reading “Q: My Map Is Not Showing”