Fall 2023 Locator Updates

We have been busy catching up on some much-needed maintenance updates to the Store Locator Plus® family of plugins. While our SaaS service has been running smoothly, there have been several issues that needed to be addressed with the WordPress plugin versions. Some of the issues are related to changes in WordPress core with breaking changes — things they changed that no longer work the way they used to. Other issues, which have come up more recently are due to breaking changes in MySQL — specifically MySQL version 8 and higher.

Large File Imports : November Fall 2023 Locator Updates

Users of the Power add on that were importing large location files would run into issues if they were also using PHP 8.2 or higher. Large files are handed off to a background processor (cron jobs in Linux-speak) for WordPress to prevent browser time out and connection issues. Since larger files often take more than the 300 seconds most PHP servers configurations allow, Store Locator Plus® first uploads the file to the media library (usually takes less than 300 seconds even for large files) , the reads that file in chunks via an asynchronous cron process to ensure the entire file is processed even when the server says “you used up too much of your allowed time, we are shutting you off”.

Store Locator Plus® implemented this “chunk processing” years ago (2018 maybe?). After uploading a CSV file, Store Locator Plus® starts a timer in the background that runs every minute asking “did my file import finish?”. To do so, it keeps track of the import progress via meta tags associated with the media file stored in WordPress. These meta tags including things like how many lines were read, how many were processed, and other metrics that this timer can look at to determine if the entire file was processed. If not, it starts processing more of the file from where it left off. When it finishes the timer is deleted so the app does not keep taking up system resources.

Unfortunately a code patch in the 2310.XX updates disabled this cron process, which stopped all large files from importing. This has been resolved.

MySQL 8 Changes

Last month we updated the Store Locator Plus® WordPress versions to support MySQL 8 and higher. Turns out MySQL (not MariaDB, the open source and free counterpart many hosting services use — MariaDB still works as expected) decided to allocate the word “RANK” for their own internal use. This new “reserved word” happens to match a field name we have been using one of our add-ons for years. Now that field name breaks things for users running the “bona fide” Oracle version of MySQL 8 or higher. Thankfully there is a simple workaround which has been patched in the October Fall 2023 Locator Update.

Unfortunately, anyone that manually upgraded their MySQL version from pre-8 to 8+ probably broke things on their Store Locator Plus® installs; Especially if they decided to activate the location ranking feature after doing so. While generally a good idea to review things like breaking changes BEFORE upgrading a database engine, life it hectic and often the “upgrading is better, get it done” path takes precedence in these situations.

For users that upgraded the database and had an existing Store Locator Plus® installation, the data structures and related functionality for ranking will remain intact and work fine if all our plugins have been updated to 2310.XX or higher. If ranking was enabled AFTER the database was upgraded you may need to remove the wp_slp_extendo and wp_slp_extendo_meta tables, then re-install and re-activate the Experience add-on (you may also need to reset the WordPress meta that marks the current installed version of this plugin).

Anyone installing on a NEW installation of WordPress with Store Locator Plus® add ons for ranking locations likely ran into an issue before our 2310.XX version of the plugin. The best path forward here is to deactivate the Store Locator Plus® plugins, manually remove the related data tables (wp_slp_extendo, wp_slp_extendo_meta, wp_store_locator), and the entries from the wp_options table for SLP related settings (option_name like ‘%slp%’) to clear out any “cruft” before re-installing and re-activating the SLP plugins.

Fall 2023 Random Locator Updates

We’ve also been doing some clean up now that PHP 8 is in play on most servers. PHP 8 is far less forgiving, and yes, they too added breaking changes where the latest version no longer plays nice with code that worked perfectly fine in earlier versions. Multiple PHP 8 warnings have been cleaned up in the past month, though none will break the app it does create extra log entries on the server so it is always nice to clean those up.

Items we addressed include:

  • Fatal Errors : code will stop running
    • SLP_Power_Cron::$addon access level
      The Power add on visibility of the $addon variable was set to the lower-level private access when the base class it extended requires protected or higher visibility.

      Declaration added in 2023.10 per IDE recommendation that dynamically scoped variables are not longer allowed in PHP 8.2 with incorrect private $addon; property declaration on the class. The proper fix was to remove the phpDoc comment block hints that declared a hint for the property, indicating it was private to this class (phpDoc or IDE doc rules processing bug).
  • Warnings : code will run
    • version_compare() – null parameter not allowed
      Happens when a prior version was not installed (null) , which PHP 7 evaluated as “nothing” and version_compare() would return “this version is not newer”. It still does that but explicitly wants a value instead of null to compare against (we set the installed version to match the current version, which returns “this version is not newer”.

WordPress PHP 8.1 Compatibility August 2022

We have received a couple of reports about Store Locator Plus® for WordPress not working with PHP 8.1.  The  WordPress PHP 8.1 compatibility is officially listed as “not compatible” in January 2022 and remains that way today (August 20th, 2022).   There is no official release date for WordPress on PHP 8.0 or PHP 8.1 at this time.

Officially WordPress supports PHP 7.4.  As such, Store Locator Plus® for WordPress is only officially supported on PHP 7.4.

Users of the Store Locator Plus® SaaS service don’t have to worry about this. We’ve taken care of ensuring the location service is running on a stable platform

WordPress PHP 8.0 Status

However, we have tested WordPress on PHP 8.0 along with the latest release of theStore Locator Plus® for WordPress plugin.  It does appear to be working normally without notable warnings or errors.   While not officially supported, we do believe you can run WordPress and Store Locator Plus® for WordPress on PHP 8.0 without any issues.   With that in mind, we are providing support and patching services for the Store Locator Plus® for WordPress with PHP 8.0 installations.

Update On WordPress Directory Listing

Store Locator Plus® 5.9 was released last week as a security update for the WordPress plugin community.   The plugin was reviewed by the WordPress Directory staff.    They chose to keep the plugin closed for what they deemed “potential future issues” with the plugin as well as requests for several changes to follow what they deem “best practices”.   Of note in this review is that they did not cite any of the publicly reported vulnerabilities that closed the plugin in the first place as remaining open.

In other words, all reported vulnerabilities were apparently addressed to their satisfaction.

However, they have opted to keep the plugin closed until we can update our coding style.   While we are willing to work toward their new “best design practices” for coding style, this is going to take some time.  For example, the latest 5.10.1 release of the Store Locator Plus® plugin has replaced the PHP standard <?= shorthand with the longer <?php echo syntax per the WordPress Plugin Directory Team’s request.   Not a security issue, but something they requested we change before being re-listed.    This requires that we run a full internal test if the updated code before it can be released to the general public.

While we wait for the WordPress Plugin Directory Team to approve re-listing, our self-managed WordPress plugin users can only receive updates to the Store Locator Plus® plugin.  You can find this in the WordPress plugin store.   You can learn more about the update process in our 5.9 Security Update Released news post.

While we hope that the folks over at WordPress.com deem our plugin worthy of being re-listed in the near future, we have no control over what they will come back with during each review.   It could be weeks or months before the plugin is available again in the standard directory with one-click updates being available.

This is one of the biggest advantages to being on the SaaS offering, no need to manually update your locator software.  EVER.