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 javascript 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.

WordPress White Screen

The “White Screen” in WordPress is one way that a WordPress site will show bugs in the underlying PHP code or system configuration.   In geek-speak this is known as a fatal error.    It can be a bug in PHP code or an incompatibility between the code and the server configuration.

The most common cause is a bug in the PHP code itself.  Plugins, themes, and WordPress can be the source of the problem.    If you have upgraded more than one item on your site prior to noticing a white screen, any of the updated items is suspect.

Note: You should ALWAYS back-up your site before upgrading to new versions of WP or any plugins. We suggest using JetPack . BAck-up your Word Press site

Here are some ways to track down the source of a “white screen” and recover from it quickly.

Debugging With Debug Log

With WordPress it is very easy to debug the activation process of a plugin and get a detailed log file of exactly what is going on.

Often there are hidden warnings or errors. Sometimes they are generated by the plugin. Many times they are generated by OTHER plugins or your custom WordPress theme. The first stage of debugging is to turn on the built-in WordPress debugging messages and debug log.

Troubleshooting Large scale Exports/Imports

Issue: Exports are Incomplete

Multiple large-scale exports (export function is available with Power Add-on ) have been tested on the Store Locator Plus dev site. On a relatively small server, a virtual machine with 2GB RAM running CentOS 6, we  have been able to export 10,000 locations within 15 minutes with no issues. Special characters and extended data have also exported without issue.

If you are experiencing  issues there are several things to check that can cause problems during an export:

Web Server Process Limits

Apache, and nginx as far as I are aware, have per-process limits. This is built into the web server to prevent “runaway” processes that eat up all of the CPU and memory on the server over time. On shared servers this limit is very low and typically allows 30 seconds to 2 minutes of processing time. Large data sets can use up to 5 minutes or more of processing time. Make sure your server has a high enough limit to allow the entire data export to complete execution.

Store Locator Plus Handles Large Location List Imports

Some clients have datasets of 200,000 locations, none of which include latitude/longitude coordinates, only U.S. street addresses. Often customers want to know import limitations  including Google’s limit.  As of June 11, 2018 those geocoding limits will change. You will have a pay as you go billing requirement. You  will need to reconsider how to import, how often to import , and whether to break the list into smaller chunks , or skip geocoding, or switch to the MYSLP SaaS managed service.

In order to perform bulk location imports with a CSV file for the WPSLP plugin you will need the Power add-on installed.  WPSLP Power add-on does not alleviate the need for you to obtain your own API key.  MySLP users  do not need to obtain their own API keys but will need the Professional level plan or higher to import and may have limitations according to the plans.

Map Not Showing

You activated the Store Locator Plus base plug-in and followed all the instructions but when you visit your locator page no map 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 Google 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.  See Getting Started Guide.  More recently, 2018, Google has introduced security measures requiring SSL certification (HTTPS)  for sites that may want the search to locate their customers location. (Location Sensor)

How to upload and install your Store Locator Plus Add-Ons

Obtaining An Add On Pack

All add-on packs are available from the Store Locator Plus website.   Power Add-On ,  Experience Add-on , or you can purchase a Premier Subscription that provides access to all of the add-on packs as well as preferred access to the Premier support forums, pre-release products, new features and functionality that is  available only to subscribers. Limited  legacy add-ons may be   available for purchase but will not be updated beyond their current versions

Note: If you purchase the  Power or Experience add-ons as an upgrade to your existing  (Legacy) add-ons, the legacy add-ons will automatically be deactivated. In some instances you may need to delete the legacy add-ons. This is why we state, “always have a full backup of your site”  We strongly recommend looking into the WordPress backup, or better option  Jet Pack.   One of the features included , besides real-time incremental backups of your site with restore points, is the ability to restore the site to an alternate site

<!–more–>

Install An Add On Pack

Add On Packs are not listed in the WordPress Plugin Directory.    As such they need to be installed via the below  installation process.

  • Login To Your Store Locator Plus  Account
  • Download the latest zip file for your add-on pack.
  • Login to your WordPress admin panel for your website.
  • Go to the plugins sidebar menu.
  • Select Add New.
  • Select Upload.
  • Browse to your downloaded zip file.
  • Click Install now.
  • Activate

Updating An Add On Pack

Once installed a query from the WordPress Admin Panel communicates with the Store Locator Plus servers and a message  or red line will be shown as updates are available.  Occasionally, the WP server times out before it gets to the SLP plugin servers. Use the check again tool in the WP Admin sidebar or check the versions at the Store Locator Plus home page.
WP check again

Some third-party plugins and WordPress themes can prevent the update notice appearing from the Store Locator Plus server.   It is prudent to visit the Versions Page and only if necessary, perform a manual update.  

You should perform updates on your test site or a staging site first to avoid downtime or potential  issues effecting your production (live) site. You should always have a recent back-up to restore to. The safest way to do manual updates, follow these steps

Deactivate the plugin you are updating
Delete the plugin
Go to Plugins | Add New
Select Upload
Upload the latest release zip file
DO NOT click the Activate button
Go to Plugins on the sidebar
Check off the plugin you just installed
Go to bulk actions and select activate