Resolved – Settings Being Reset After Updates

Over the past 6 months or so we’ve been working with customers to resolve an issue where updating Store Locator Plus® would reset some (not all) settings. This was especially prevalent with our WordPress plugin users. With the latest 2511.08.XX release we believe we’ve finally put this issue to rest.

For some users, when they would update the base Store Locator Plus® WordPress plugin they would lose some settings. One of the settings we noticed on one of our test boxes was the Google Maps API key being reset. The full list of possible settings that could be impacted are shown here:

broadcast_timestamp => 0
default_country => us
extended_data_tested => 0
map_language => en
next_field_id => 1
next_field_ported => 
premium_user_id => 
premium_subscription_id => 
radius_behavior => always_use
slplus_plugindir => /var/www/html/wp-content/plugins/store-locator-plus/
slplus_basename => store-locator-plus/store-locator-plus.php
themes_last_updated => 0
active_style_css => div#map img {...more CSS...
admin_notice_dismissed => 0
invalid_query_message => We did not receive a valid JSONP response.
radii => 10,25,50,100,(200),500
searchlayout => ...HTML...
hide_address_entry => 0
hide_radius_selector => 0
label_radius => Within
label_search => Address / Zip
map_height => 480
map_height_units => px
map_width => 100
map_width_units => %
remove_credits => 0
maplayout => ...HTML...
initial_results_returned => 25
max_results_returned => 25
message_bad_address => Could not locate this address. Please try a different location.
message_no_results => No locations found.
instructions => Enter an address or zip code and click the find locations button.
label_hours => Hours
label_image => Image
theme => a_gallery_style
style_id => 
layout => ...HTML...
log_schedule_messages => 0
google_geocode_key => AI...HY
google_server_key => AI...HY
url_control_description => 

WordPress Environment Info Fixed

The info page for our Store Locator Plus® WordPress plugin users has been patched. Some users were experiencing a situation where the information page would not render, showing only a white space. This was due to conflicting JavaScript on some installations. The issue has been resolved and is available in the latest update to Store Locator Plus® for our WordPress plugin community.

This page includes the latest news, links to the documentation articles that help the WordPress plugin users get started, as well as an environment panel. The environment panel is important for users requesting support as it provides the WordPress environment info we need to assist in a timely fashion.

This issue does not impact users of the SaaS platform.

WordPress Environment Info

Post image by Lance Cleveland.

Editing Categories and Location Import/Export

During the month of June we have been working on several patches for both Store Locator Plus® SaaS platform and WordPress plugin users. We have also performed multiple tweaks to improve performance including leveraging some PHP 8 specific performance tweaks.

SaaS User Editing Categories

All SaaS users received an updated earlier this week patching the category edit functionality. Buried deep in the new settings history tracker was an issue that prevented categories from being edited and saved after they were created. 

Since our SaaS platform still runs most of the core features through the old-school WordPress core code it inherits a lot of garbage including the very outdated category editor (we are hoping to replace that someday with a modern React style editor). Part of the garbage that is inherited with that 15-year-old janky interface is the fact that the only way to add extended attributes to categories, like our custom map markers and icons, is to store the extra metadata in the WordPress options table. It just so happens that is the MAIN settings storage area.

We missed that when adding our settings history feature to the SaaS plugin. Thus, any time a user saved their category updates for their locations the WordPress engine would fire the “hey, we just saved some settings” trigger. Our code was expecting actual settings not category data and didn’t handle it well.

That has been patched and is already deployed for all SaaS users.

Read more: Editing Categories and Location Import/Export

Location Import/Export

Users that have installed the Power add for WordPress may have issues importing and exporting locations. After a week of tracking down this issue, which only happens on SOME WordPress sites, we have found that the WordPress user settings for administrators can be corrupted. This causes the admin interface to not load properly. That causes the JavaScript for the Power add on (and likely lots of other plugins, not just ours) to not be loaded.

This is NOT corruption caused by our plugin code. We are not sure what triggers it, but in some case a WordPress install will start thinking it is a “multisite” install and attaches either the network_admin or user_admin attribute to a logged in user session. When that happens the “do this when an administrator is on the Store Locator Plus® admin pages” does not fire. 

What did we do to fix this? In our test installations where we could reproduce the problem we went to our administrator user profile , changed the website URL (you can change ANY data — might be a good time to update your passwords) and saved. After we re-saved our user profile with a new website URL or password everything came back as expected.

How did the user admin meta get out-of-whack? We may never know.

Bottom line, if you location imports or exports are broken try re-saving your user profile in WordPress.

This issue does NOT impact SaaS users.

Post image by Lance Cleveland