Improved Import With Power 4.9.2

Power 4.9.2 for our WordPress plugins was released tonight with improved import processing.  Several updates are included as we progress towards improved large location import processing.    All of the upgrades are coming to the MySLP service for our non-WordPress users on services like Wix, Weebly, and Squarespace but we have a bit more testing and integration to ensure 99.999% up time on our SaaS service.

Fixing large location imports

If you were importing thousands of locations and found the import process would get partway through then stop, the Power 4.9.2 patch should help.    If your file could not be processed in one pass by the background import processor, Store Locator Plus would detect the unfinished import and pick up where it left off.  Problem was it would not re-read the header row to match up data to locator fields and no additional locations would come into the location list.    This issue, while leaving the new 4.9 import architecture no better but no worse than the 4.8 and earlier releases, has now been resolved.     The second , and third or fourth passes if necessary, properly pick up where things left off.

The second fix is to prevent that second or third location import pass from starting prematurely when the first pass slows down.    Power 4.9.1 would sometimes think the first import stopped processing and start where the first pass paused.   This slowed EVERYTHING down and if Locations > Import > File Settings > Duplicates Handling was set to Add versus Update it may have duplicated records.

The import issue could manifest for smaller lists of locations if your server is underpowered or your hosting service is severely restricting PHP time slices (processing time) on your account.   A typical moderately-loaded server should be able to easily process 2500 locations within a 60-second PHP time slice with time to spare.     For servers that cannot process imports that quickly this patch will help keep the process going.

Improved import for all list sizes

While traveling the path of fixing the large list imports we also found several ways to improve import performance.  Where we would run through around 600 locations being imported in a 15 second processing time limit ( Settings > General > Server > PHP Time Limit ) with Power 4.9.1 the same file would load all 1,000 locations before the time ran out.     Our 25,000 location test would load nearly 10,000 locations with a typical 60-second PHP time limit.

As an aside, the default time limit setting for SLP is 600 seconds.   We were turning this DOWN to try to force our servers to behave like a severely taxed web server or a severely underpowered server.    Many shared hosting plans will NOT honor this setting and changing it will not have any impact on most server.     MySLP users will not see this setting in Advanced Options as our servers are already tuned to allow maximum PHP processing for large location lists.

Keeping data intact with slashes in CSV files

The most commonly referenced specification for CSV file processing, RFC 4180, dictates what most computer scientist agree is a valid CSV file format.   One part of that specification is how to deal with data that has a quote in it.   Since CSV data that has any special character within is to be wrapped in quotes (“) there has to be a special way to deal with things like a store name My “Special” Store.    RFC 4180 says that the CSV file should use double-quotes to manage this.

Rather than code all of this ourselves we use the built-in PHP CSV file processing functions.    It is far faster than running custom PHP code.

Until our 4.9 releases we had been trying to keep all of our code compatible with PHP 5.2.4 due to the WordPress minimum requirement being 5.2.4 despite their recommendation to use PHP 7.     We finally decided we could not longer support the 11-year old version if we were going to write efficient applications.   Our plugins no longer support PHP 5.2.4 and now require PHP 5.3.

The benefit of this requirement is we can now support the proper RFC 4180 specification instead of the PHP “special Sybase compatible” version that sees the \” character combination as an escape sequence.   This messes up the import with any field that ends with a \ and starts “shifting fields” into the wrong columns.

As of Power 4.9.2 the \ character is treated like any other character which makes the imports a lot happier with files that Excel is mangling.

Power 4.9.2 still requires proper line endings, so for our Mac users running older versions of Excel DO NOT export in Mac compatible mode.   For some reason Microsoft things Mac computers still use the 2003 standard return (\r) line ending instead of the modern standard CRLF (\r\n) line endings that are required for a proper CSV file formatting.    Why Excel allows a CSV export of ANY format that does NOT have a CRLF is a mystery as this is not part of ANY CSV standard including the “special Sybase compatible” version that PHP allows.

Improved import instructions and reporting

One of the obvious changes is some notes are on the Locations > Import tab to help guide you to some of the updates in the 4.9 import process.  This includes explaining the basic 3-step process and the fact that you can find your location CSV file in the Media > Library of WordPress.

The Power 4.9.2 release has simplified the message logging on the bottom of the import page timestamping only the start and end of processing and reporting problem records.   Added, updated, and not updated records are no longer reported on an individual basis in order to improve performance and consume far less memory on large file imports.

PHP Versions
PHP Versions

In addition to the improved import reporting,  the summary with a count of how many records in the CSV file has added, updated, not updated, were malformed and other summary data is now visible on a per-file basis in the Media Library file details for location CSV files.    This is in addition to the Power 4.9 standard file status , file size, current processing offset, and record count (when completed).

Other tweaks and updates

We snuck in a few smaller things into 4.9.2.

The Identifier column has always had special meaning in CSV files; enabled in General > Data > Add On Data Extensions > Enable Contact Fields, this special column override the sl_id column to match up records to be updated.  While useful for aligning Store Locator Plus with third party data systems it does add some extra overhead to the file processing.    Power will no longer add the overhead to check for that column if the Enable Contact Fields setting is not enabled.  It also means updates will no longer work if you DO include that field in your data source but have not ensured the setting is enabled.   Most sites will not need the Identifier column and update feature.

We fixed the Remote File Retrieval settings.  Somewhere during our updates over the past year these settings stopped saving when you changed them.   We also happened to create a better system for marking “quick save” fields like these the auto-save when changed. You may start seeing quick-save options in more places as they reduce button clicks and are faster than saving entire pages of settings to change one thing.

One last improved import addition — we now report on CSV files that look like they have too many columns.  A CSV file with more than 256 columns is a good indicator that the file is corrupt and the line endings (see Excel and MacOS above) are not set properly.   Rather than create a huge string that includes the entire file and may crash the server, Power 4.9.2 flags this potential error and truncates the logging.   The number of columns (aka fields) is shown in the Media Library details as well and provides more insight into what is going on “behind the scenes” should an import fail.

 

Store Locator Plus and WordPress 4.9.1 Updates

It has been a busy week for WordPress and all the updates and patches going around.    For those on our MySLP managed service, sit back and relax.  You’re good.    While you may wait a little longer for some new features and a couple of minor patches you are not going to be affected by software updates.   You’re good.

For WordPress users we’ve been busy chasing down some notable functionality issues with Store Locator Plus and the Add Ons for WordPress since WordPress 4.9 and 4.9.1 hit the update queue on your sites.

Store Locator Plus for WordPress 4.9.1

Any time WordPress puts out a major release we get a slew of new support requests.   4.9 was not exception.   People that have put off updating their site tend to “do everything at once”.  When you are updating a complex system with software from potentially dozens of different companies there are bound to be some problems.    We’ve been busy squashing bugs reported in our software and guiding people towards solutions that are caused by other elements in their software stack.

While WordPress 4.9 does not have “breaking changes” to WordPress itself, we do recommend updating to get the latest security features.  For those staying on WordPress 4.8.2 you can read about the breaking changes in WordPress 4.8.2 that forced users to upgrade Store Locator Plus.

PHP 5.3 Compatibility

As of Store Locator Plus 4.9 we no longer support PHP version 5.2.   We are now properly checking the WordPress version and disabling Store Locator Plus if you are not on at least version 5.3 of PHP.

According to PHP history, version 5.2 was officially at end-of-life, no longer maintained by PHP, in January 2011.  Version 5.3 is marginally better with end-of-life in August 2014.  WordPress recommends PHP version 7.  We do too, but at the very least you should be on PHP 5.6.

In the meantime we’ve fixed some code that was introduced that only works on PHP 5.4 so we can maintain our PHP 5.3 compatibility.

Non-English Blank Settings Tabs

We finally located and squashed the bug that caused some non-English sites to lose settings tab content when switching sub tabs on the Store Locator Plus | Settings interface.

On a related note, if you are using SLP on a non-English site please read our documentation on how you can translate SLP to your language.  If the language files are not at least 93% complete WordPress will not provide translated text on our admin interfaces. This is handled at Translate.WordPress.Org.

Debugging

When an update generates the dreaded White Screen of Doom (WSOD) we often ask people to enable the WordPress Debug Log so we can quickly find and fix code errors in our plugin.   In version 4.9.1 you can now enable “late loading” WordPress debugging from the Store Locator Plus admin pages (assuming you can at least get to those, which you often can) without having to edit the wp-config file.    While it does not catch all errors it will cover 95% of the Store Locator Plus code base during run time.

You can enable debugging via the Enable WP Debug under Settings | General | Admin | Messages | Enable WP DEBUG.

This often generates warnings and messages on your web pages so we do not recommend doing this at peak hours for your site.   In fact we recommend you use a hosting service, like SiteGround’s GoGeek service, that provides “one-click” staging sites that are an exact replica of your live site.    Managed WordPress hosts are rarely more expensive than other hosts; we recommend you consider switching to a host that provides staging services when your hosting contract comes up for renewal.

On The Radar

This patch is not the end of our punch list for this month.

PATCH: Location Page Export | Bulk Actions Not Working We know about an issue we are still trying to replicate where the Power add on and WordPress 4.9 are colluding to not finish loading the Store Locator Plus | Locations pages.  That means the JavaScript for that page does not load completely and lots of weird things happen.  This is new since Power 4.9 and WordPress 4.9.   Given the problems WordPress has had with JavaScript we are not 100% certain who broke what.  We are still investigating and hope to have Power 4.9.1 out in a few days with a fix.

PATCH: Power Tag Search Not Working – we have been able to reproduce this problem and are tracking it down for a 4.9.2 release of SLP or 4.9.1 of Power.   Both updates should be out within a week.

FEATURE: Add On Auto Update – while we try to “go by the book”,  following WordPress Best Practices, their plugin development guide, and the WordPress Core code style guide that allows us to be contributor to WP Core there are times when you have to “be creative”.   WordPress update notifications for Store Locator Plus add ons have been getting worse with each release of WordPress.   We are finding many sites now get notifications weeks after our updates have been published for our paid add ons.    We are working on a new custom update notification system to automatically download and install the latest add ons for Store Locator Plus when the base plugin is updated and no longer compatible with an addon.  We are hoping to get this feature out in the 4.9.2 release if possible.

Having issues?  Please use the support forums as a first line of communication as it helps others with a similar issue see answers we post.  If you cannot post there you can send us an email but email does not show up in the dev’s Slack Channel feed like forum posts do.

Whether posting in the forum or sending email, make sure you post the exact URL for your locator page and copy the plugin environment from under Store Locator Plus | Info | Plugin Environment on the site that is having the issue.  Without BOTH pieces of information it takes us a LOT longer to figure out what may be happening on your site.   It also helps to provide us with step-by-step instructions to reproduce the problem and see what you are seeing, as in “Go to this page <url here>, type in 29464 as the address, search.   I expect to see store A, B, C and instead I see store B, and C only.”

Example Plugin Environment Detail

Did you know on MacOS you can get a screen shot by holding down the command key + shift + 4?   It is a great way to show us your plugin environment.

 

Location Sensor Can Help Visitors Find Your Store

Finding  Locations Near You

How important is it for people to find a location nearest them?  “Near Me” has been a top-ranked search term on Google for the past seven years. This may be the number one reason to use a location sensor.  Research indicates that the common phrases of “near me” in Google searches is a top-ranked query.   The phrase “handyman near me” might return a  cloud based app that in turn redirects  the users search to some  popular apps but how does your browser,  Google Maps or other platform know where you are?

Location Sensor

Enter location sensor, a browser-based tool that detects where a user is at the time of search.  On GPS-enabled mobile devices it returns the precise location using the device’s built-in GPS sensor.  For the Store Locator Plus users the location sensor can be enabled by checking a box under General Settings.   WordPress Plugin users will need the Power add on.   MySLP service users will need to be subscribed to the Power, Professional, or Enterprise plan.

Mobile App using location sensor
Location sensors in mobile apps can guide people to your store.

Using HTTPS Improves Sensor Performance

Google Chrome’s v 50 and higher ( the most popular browser with the largest market share  at this time)  requires site urls to be served over a secured site before it will allow the location of the user to be transmitted.  They have stated that location is sensitive data and determined that HTTPS versus HTTP  be  required to protect the privacy of your users’ location data.  Other popular browsers , such as Mozilla Firefox, may submit a pop-up box asking the user to grant permission for their location to be known.

In short, if your site is using the location sensor feature it must get an SSL certificate and be serving pages on an https address.   Many browser disable multiple features if you are not a secure site, including the location sensor.   It won’t be long before ALL browsers disable location sensor support if you are not hosting an https site.

Location Sensors Can Increase Sales

If you have a physical location that counts on people walking in the door to make a sale, adding Google Maps and employing the location sensor can have a notable impact on your walk-in traffic.    Your first step is to get an SSL certificate on your site so you can serve secure pages; This also helps boost your Google search rank.   Once you have that completed put Google Maps software that supports the locations sensor on your site.     Add a couple of posts to your site that relate to your business such as “Boutique Near Me” and drop the map code on that post.   It won’t happen overnight, but as your site starts to generate traffic the map will lead people to your store.

 

Have questions?   Contact us.