Recovering From Critical Error After WordPress Plugin Updates

petaled flower drawing on white egg shell

This article provides information on how to recover from critical errors after a plugin update. Critical updates can occur for a variety of reasons. These errors can take your WordPress site offline until the error is resolved.

For the purpose of this article we are going to delve into an example where a Store Locator Plus® add on is running an outdated version and the base plugin is updated to an incompatible version. While newer versions of the Store Locator Plus® plugin will auto-detect incompatible add on versions and disable them automatically, there are some third party add ons that do not report version updates properly and can prevent this auto-detection from working.

Here is how to recover from these issues.

Step 3: Add A Location Map To Your Site

stock

Add a location map to your site by putting the SaaS embed code or WordPress shortcode on any page. You’ll need to have an active Store Locator Plus® SaaS subscription or have the Store Locator Plus® for WordPress plugin installed and activated.

Make sure you’ve completed the initial configuration and setup steps outline in the Store Locator Plus® Getting Started article.

When a visitor goes to a page with the Store Locator Plus® map code embedded, it will show a default search form and a map centered in your country or on the “Center Map At” address you entered when configuring Store Locator Plus®. When someone searches for a zip code that is close enough to a location you entered it will show those locations on the map.

WPSLP Premier General Admin

WPSLP Premier customers will need to add their User ID and subscription ID under the Store Locator Plus / General /Admin tab. To find your Premier account information, log into WordPress Store Locator plus account .

Scroll to Premier Subscription Info
Thank you for being a Premier Member. You will need to enter your User ID and Subscription ID via the Store Locator Plus General Settings Tab under the Admin section in order to get the latest updates to the Premier Plugin.

Your user ID is: (A number will be here)

Subscription id is : (numbers will be here)

WordPress Custom CSS Rules

You can add custom CSS rules to WordPress to style your directories and location maps without having to wait for a custom Store Locator Plus® style or a theme that supports full CSS rules. WordPress has a built-in CSS customization tool that applies to all pages on the site.

You can use this custom CSS tool to do things like format the MySLP SaaS, or WPSLP plugin, directory listings.

How To Add Custom Rules

Login to your site as a site administrator.

Click on the Customize menu entry in the admin toolbar.

Click on Additional CSS in the sidebar.

Enter a fully qualified CSS rule.

This example is used to style the MySLP SaaS directory listings on the site. MySLP is a pure JavaScript embed implementation and requires the site hosting the embed to add extra CSS rules. The output changes the MySLP Directory state selector from a vertical list to a horizontal list as shown on the MySLP Directory page.

T_PAAMAYIM_NEKUDOTAYIM

T_PAAMAYIM_NEKUDOTAYIM is the scope resolution operator.    In most languages it is the double-colon (::).

Most people that are looking for this odd-looking word are probably running into an issue with a PHP program.   For as often as it comes up, there is very little information on what is causing the problem.

With PHP it typically means the application has a syntax error.    The PHP interpreter cannot figure out how to compile your code properly and crashes with the Unexpected T_PAAMAYIM_NEKUDOTAYIM error message.   Often it is due to a class name or static method reference that PHP cannot handle.  Either the class name is entered incorrectly OR your PHP version is so old it cannot process variable names before the double-colon operator.

For Store Locator Plus™ users that are still using the WordPress plugins it most likely means the version of PHP you are running on your web server is very outdated.  Upgrade PHP to a newer version, preferably something that is supported in the past 5 years like PHP 7.

User that chose the fully managed Store Locator Plus™ service don’t have to worry about things like this.

Curly Quotes In WordPress Shortcodes

WordPress blog posts likes to use curly quotes instead of straight quotes whenever you write an article.     Our documentation site is built on WordPress which means many of our articles are replaced any quotes we type in an article with curly quotes.

The problem is that the WordPress shortcode processor does NOT like curly quotes.   If you use curly quotes in a shortcode attribute such as [slp_directory by=”city”] and those quotes are “curly”, WordPress treats the quotes as a plain-old alphabetic character just like the C-I-T or Y in “city”.   In other words WordPress things you mean “by quote-city-quote” not “by city”.

Why is that an issue?

If you copy-and-paste most examples from this documentation site WordPress will copy the “pretty curly quotes” into your shortcode.     If you paste that into your WordPress page it breaks.

Straight versus curly quotes when pasted into a page.

An example of how this can impact Store Locator Plus can be seen from my example where I pasted the slp_directory shortcode directly from the docs site into my test site.    I get an invalid data query because WordPress added curly-quotes to my data field name.    The SLP database does not have a field name quotesl_storequote but does have a field named sl_store.

The fix?

Make sure you re-type each quote manually.  Typing the ” in your blog instead of copy-and-paste will ensure you are getting “straight quotes” in your shortcode attributes not curly quotes.

This is how the example looks now that the curly quotes have been replaced with straight quotes.

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.