Posted on

WordPress 4.5 Breaking JavaScript (aka Where Is My Map?)

Ever since WordPress 4.5 rolled off the press there have been numerous complaints about websites breaking.   Numerous reports are coming into our Store Locator Plus forums and support email telling us “our map broke when they updated our website”.  The problem?  jQuery. To be more specific the problem is not jQuery but  how some plugins and themes implement jQuery in WordPress.

WordPress 4.5 started shipping jQuery version 1.12.3 as the “official” version of jQuery being used  with WordPress core. jQuery 1.12 has more stringent controls than previous versions.   The most obvious, jQuery 1.12 no longer “hides” some of the syntax errors that lay dormant in plugin code.   If there is malformed  or incorrect syntax, jQuery 1.12 will complain.  Your browser will most likely stop executing ALL scripts from that point forward.  As you can imagine, this causes things, like themes and plugins  to break.
Continue reading WordPress 4.5 Breaking JavaScript (aka Where Is My Map?)

Posted on

Store Locator Plus Updates: SLP 4.3.20 patches, geocoder fallback, and translations, Contact Extender 4.3.01

NASA Image blue marble east
NASA Image Blue marble-east
NASA Image Blue marble west
NASA Image Blue marble-west

 

Where in the world?  

We’re in the world!

 

 

Enhancements, patches and changes have been made to Store Locator Plus in version 4.3.20.

The extended data systems have been improved with several “corner case” issues resolved for users that are migrating data to new systems or creating a fresh install of location data within a new system. In some cases, the extended data was not being correctly saved to the locations table. Another major focus in this update involves language translations. A number of bug fixes included the setting of the default labels for fields such as “Email”, “Hours”, and “Fax” to non-English values when performing an initial install in a non-English language. This should assist our international customers in managing their SLP data. Another feature that has been added is the “fallback” latitude/longitude to provide a better location than 0,0 (which is off the coast of Africa in the middle of the ocean) when Google query is offline and comes back with “no results found”. An explanation of the Google MAP API is discussed in previous blogs in the SLP news.

SLP 4.3.20 Highlights:

  • Enhancement: Use Language Translations for the SLP INFO tab that includes the Plugin Environment
  • Enhancement: Use Language Translations for the back end under Experience/View/Settings
  • Enhancement: Google Geocoding fallback to a specified latitude/longtitude when Google query is offline
  • Fix: Data extension fields not importing when imported for the very first time. (Note: Import features only available to ProPack users)
  • Fix: When importing call to the special identifier field in Contact Extender
  • Fix: When updating an existing location and the address does not change, make sure that lat/long is retained.
  • Add: Hide SLP menu in the WP admin bar if user does not have manage–slp–admin capability
  • Fix: Load the proper default language settings for data driven default strings
  • Fix: Rename the language files to match the Translate.WordPress.Org standard of ‘store-locator-le’
  • Change: Swedish, Dutch and Azerbaiijani(Turkish) translations come direct from the WordPress Plugin Translation updates instead of the store-locator-plus.mo directory.
  • Contact Extender 4.3.01:

  • Fix: Special identifier field matching to work with external database identifiers when imported
  • Watch the author/developer’s tutorial video and commentary regarding Store Locator Plus update to version 4.3.20 and Contact Extender update to 4.3.01. If you have any questions regarding this update or any SLP products, please be sure to sign up for the free support forum. As always, we appreciate the SLP community and forum users who provide us with their plugin environment and details when posting.

    Change Log

Posted on

WordPress dbDelta Better In 4.2, Not Yet Perfect

WP dbDelta Bug Report Banner

There have been a LOT of changes in WordPress Core including updates to the dbDelta() method in the upgrade function set.   What is dbDelta()?  dbDelta is the primary function used by WordPress to determine if the structure of data tables needs to be augmented between releases.   It works great for upgrading core WordPress data tables.    Where it has problems is with developer-specific SQL statements used to create secondary tables in plugins and themes.    Store Locator Plus, for example, uses a secondary table to storing basic location data.

Unfortunately dbDelta has always had issues (see running commentary on Trac ticket 10404), especially when it comes to indices on a MySQL table.   Most well-designed data tables will have primary and secondary indexes on the table to improve query performance.    dbDelta has a hard time figuring out when an index already exists and has not been modified.   If you did not craft your CREATE TABLE command EXACTLY the way dbDelta wants to see it, the dbDelta method will create new indexes.    This can cause performance degradation and unnecessary overhead in the MySQL tables when a data column ends up with 10, 20 , 30+ copies of the index; one created every time the plugin or theme is updated.

Many plugins and themes suffer from this malady.   Over two years ago I dug into dbDelta and learned the syntax secrets to get WordPress to stop creating duplicate indexes.   Today I found a site that was back to its old tricks running the latest version of Store Locator Plus and WordPress 4.2.2.   As it turns out the rules for dbDelta have changed and thus the syntax for creating a “dbDelta friendly” SQL statement has changed as well.    With dbDelta a behind-the-scenes feature it is never broadcast to the general public that it has changed and thus goes undetected for a while when something goes awry.

Turns out the changes are not new.  They go back to at least WordPress 4.1.    The last time I dug into this issue was WordPress 3.8.   Guess it is time for some phpUnit testing on dbDelta within my own plugin suite testing.   If things are running properly the dbDelta command for an existing installation of Store Locator Plus 4.2 should yield NO QUERY UPDATES when activating/installing a newer version of the plugin.

WP 4.1 dbDelta Results

Source SQL:

dbDelta SQL: CREATE TABLE wp_store_locator ( sl_id mediumint(8) unsigned NOT NULL auto_increment, sl_store varchar(255) NULL, sl_address varchar(255) NULL, sl_address2 varchar(255) NULL, sl_city varchar(255) NULL, sl_state varchar(255) NULL, sl_zip varchar(255) NULL, sl_country varchar(255) NULL, sl_latitude varchar(255) NULL, sl_longitude varchar(255) NULL, sl_tags mediumtext NULL, sl_description text NULL, sl_email varchar(255) NULL, sl_url varchar(255) NULL, sl_hours varchar(255) NULL, sl_phone varchar(255) NULL, sl_fax varchar(255) NULL, sl_image varchar(255) NULL, sl_private varchar(1) NULL, sl_neat_title varchar(255) NULL, sl_linked_postid int NULL, sl_pages_url varchar(255) NULL, sl_pages_on varchar(1) NULL, sl_option_value longtext NULL, sl_lastupdated timestamp NOT NULL default current_timestamp, PRIMARY KEY (sl_id), KEY sl_store (sl_store), KEY sl_longitude (sl_longitude), KEY sl_latitude (sl_latitude) ) DEFAULT CHARACTER SET utf8

dbDelta Updates List:

QUERY: ALTER TABLE wp_store_locator CHANGE COLUMN sl_linked_postid sl_linked_postid int NULL
QUERY: ALTER TABLE wp_store_locator CHANGE COLUMN sl_lastupdated sl_lastupdated timestamp NOT NULL default current_timestamp
QUERY: ALTER TABLE wp_store_locator ADD PRIMARY KEY (sl_id)
QUERY: ALTER TABLE wp_store_locator ADD KEY sl_store (sl_store)
QUERY: ALTER TABLE wp_store_locator ADD KEY sl_longitude (sl_longitude)
QUERY: ALTER TABLE wp_store_locator ADD KEY sl_latitude (sl_latitude)
for update

Update Results:

[wp_store_locator.sl_linked_postid] => Changed type of wp_store_locator.sl_linked_postid from int(11) to int
[wp_store_locator.sl_lastupdated] => Changed type of wp_store_locator.sl_lastupdated from timestamp to
[0] => Added index wp_store_locator PRIMARY KEY (sl_id)
[1] => Added index wp_store_locator KEY sl_store (sl_store)
[2] => Added index wp_store_locator KEY sl_longitude (sl_longitude)
[3] => Added index wp_store_locator KEY sl_latitude (sl_latitude)

My WP 4.2 dbDelta Results

Better, but still not quite right.

Source SQL:

CREATE TABLE wp_store_locator ( sl_id mediumint(8) unsigned NOT NULL auto_increment, sl_store varchar(255) NULL, sl_address varchar(255) NULL, sl_address2 varchar(255) NULL, sl_city varchar(255) NULL, sl_state varchar(255) NULL, sl_zip varchar(255) NULL, sl_country varchar(255) NULL, sl_latitude varchar(255) NULL, sl_longitude varchar(255) NULL, sl_tags mediumtext NULL, sl_description text NULL, sl_email varchar(255) NULL, sl_url varchar(255) NULL, sl_hours varchar(255) NULL, sl_phone varchar(255) NULL, sl_fax varchar(255) NULL, sl_image varchar(255) NULL, sl_private varchar(1) NULL, sl_neat_title varchar(255) NULL, sl_linked_postid int NULL, sl_pages_url varchar(255) NULL, sl_pages_on varchar(1) NULL, sl_option_value longtext NULL, sl_lastupdated timestamp NOT NULL default current_timestamp, PRIMARY KEY (sl_id), KEY sl_store (sl_store), KEY sl_longitude (sl_longitude), KEY sl_latitude (sl_latitude) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci

dbDelta Updates List:

QUERY: ALTER TABLE wp_store_locator CHANGE COLUMN sl_linked_postid sl_linked_postid int NULL
QUERY: ALTER TABLE wp_store_locator CHANGE COLUMN sl_lastupdated sl_lastupdated timestamp NOT NULL default current_timestamp
QUERY: ALTER TABLE wp_store_locator ADD PRIMARY KEY (sl_id)

Update Results:

[wp_store_locator.sl_linked_postid] => Changed type of wp_store_locator.sl_linked_postid from int(11) to int
[wp_store_locator.sl_lastupdated] => Changed type of wp_store_locator.sl_lastupdated from timestamp to
[0] => Added index wp_store_locator PRIMARY KEY (sl_id)

WP 4.2 dbDelta SQL Best Practices

Some of these carry over from the prior dbDelta comments, some are new with later versions of dbDelta and MySQL.   The code is fairly robust, but if your MySQL installation comes back with a different format for the describe command this can wreak havoc on dbDelta().     I’ve presented things to look out for when crafting your dbDelta SQL statements as well as possible improvements in WP Core for dbDelta.    I may submit patches once again, but it has proven nearly impossible to get patches reviewed and approved for dbDelta.   Makes sense given the HUGE impact this function has on the WordPress Core engine, but there are thousands of plugins and themes wreaking havoc on WordPress performance due to some of these issues.    Maybe a detailed review like this will help get some updates into core.

Table Creation / Modification Commands

dbDelta() uses the MySQL DESCRIBE <table> command to fetch data about the table name passed in to dbDelta().  It is parsed with a regular expression out of the SQL statement looking for CREATE TABLE <…> , CREATE DATABASE <…> , INSERT INTO <..>, and UPDATE <…>  where the first “word” in the <…> part is assumed to be the table name.

Notes

  • The process appears to be case sensitive.  Use the commands as noted above in all caps.
  • Make sure you have no extra spaces, newlines, or other whitespace in between CREATE and TABLE or the other two-word directives noted here.
  • Make sure your table name has a leading space before and trailing space after.

Possible Improvements

  • Consider make thing preg_match() case insensitive.
  • Consider changing the single-space in commands like INSERT INTO into multi-whitespace regex i.e. INSERT\s+INTO

Defining Column Types

On some servers, such as my CentOS 7 development box, MySQL Ver 15.1 Distrib 5.5.41-MariaDB, has decided that post types of INT really mean INT(11).   Different variations may post different results back from the DESCRIBE command, but here is what I find working on MOST servers including my Linux dev box:

  • Always specify the LENGTH for each field type that accepts a length.  For most fields use the default length.
    • int(11)
    • mediumint(8)
    • varchar(1) to varchar(255), 255 is the default.
  • Fields without lengths:
    • longtext
    • mediumtext
    • text
  • Do not put spaces between the field type and the parens or the number in parens for the length.
  • User lowercase for field name and the field type.
  • Use uppercase for the NULL and NOT NULL specification.
  • Do NOT have extra spaces between the field name, the field type, and any of the additional definition parameters.

Examples

global $wpdb;
$sql =
'CREATE TABLE my_table (
my_id mediumint(8) unsigned NOT NULL auto_increment,
my_first_field varchar(1) NULL,
my_second_field varchar(255) NULL,
my_third_field int(11) NULL,
my_lastupdate timestamp NOT NULL default CURRENT_TIMESTAMP
)
DEFAULT CHARACTER SET ' . $wpdb->charset;

Things the cause problems in my setup:

  • Two spaces after the field name my_lastupdate and the word timestamp.
  • Using int instead of int(11) on my_third_field.
  • Using lowercase CURRENT_TIMESTAMP on my_lastupdate.

Possible Improvements

  • Consider make thing preg_match() case insensitive.
  • Make the comparison on the default case insensitive, or shift the inbound query uppercase.
  • Consider changing the single-space in commands into multi-whitespace regex tests.

 

Defining Keys (Indices)

The key comparison system is just as strict with whitespaces and case sensitivity as the column comparison routine in dbDelta.   You MUST have TWO spaces after the keywords “PRIMARY KEY” before defining your index field but only ONE SPACE after all other keys.

  •  ALWAYS declare the column names for every key type, including primary key.
  • ALWAYS put your column names inside parenthesis with no spaces.
  • PRIMARY KEY should NEVER have a key name.
  • PRIMARY KEY is always followed by two spaces then the parenthesis then the column name and closing parenthesis.
  • KEY is always followed by a single space, the column name, then a single space then parenthesis around the column name.
  • They keyword PRIMARY KEY must be uppercase.

Examples

global $wpdb;
$sql =
'CREATE TABLE my_table (
my_id mediumint(8) unsigned NOT NULL auto_increment,
my_first_field varchar(1) NULL,
my_second_field varchar(255) NULL,
my_third_field int(11) NULL,
my_lastupdate timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY  (my_id),
KEY third_key (my_third_field)
)
DEFAULT CHARACTER SET ' . $wpdb->charset;

Things the cause problems in my setup:

  • Missing the second space after the PRIMARY KEY definition.

Possible Improvements

  • Consider changing the single-space in commands into multi-whitespace regex tests.
  • Make the indices incoming text for the PRIMARY and KEY keywords force to uppercase.
Posted on

Locator Improves Map Themes

SLP4 Banner

Store Locator Plus 4.2.35 was released today with several updates aimed at providing a better plugin theme experience.

What is a plugin theme?

For Store Locator Plus the plugin theme, for the most basic configuration, is a CSS file that sets the display of the locations search form, map, and search results. Store Locator Plus ships with over a dozen themes from the most basic versions that allow the WordPress theme to set all of the display element rules. Many WordPress themes, however, do not take into account the styling required for the many display elements that Store Locator Plus injects into the middle of a page. Thus there are Store Locator Plus themes that do more extensive styling by specifying even the smallest CSS details that impact the content that the locator adds to your pages.

SLP 4.2.35 Custom Theme
SLP 4.2.35 Custom Theme settings manager.

More complex themes bury various locator settings in the header of the CSS file. The Store Locator Plus theme system reads the CSS header and uses the settings within to suggest various locator settings. These settings can impact the entire locator layout by changing the basic HTML that locator injects into the middle of your page when using the slplus shortcode. By employing the Pro Pack (overall shortcode HTML layout), Enhanced Search (search form layout), Enhanced Map (map and info bubble layout), and Enhanced Results (results layout) the more advanced locator themes can drastically change the locator look-and-feel with a single click of the “apply settings” button on the admin panel.

What’s New?

The latest version of Store Locator Plus no longer CHANGES the default theme CSS file. In a “why didn’t I think of this sooner?” (years ago) moment, the default theme process was changed. In prior releases the default theme was always named default.css and was known as the “Default Theme”. The problem is that was always the starting look-and-feel for a fresh Store Locator Plus install. When WordPress releases a new version the default theme changes. Often the default Store Locator Plus theme needs to be tweaked to look its best. However changing the default theme CSS would then change how the locator looks on many installations that left the locator theme set to default. The result was that for fresh installs on the latest WordPress Theme the install looked better. However MOST sites do not use the default theme and even minor changes to the locator CSS rules could create havoc on the user interface. As of version 4.2.35, the default theme can be ANY NAME. For example, with the 4.2.35 release a fresh install will set the default theme to the “Twenty Fifteen Rev 02” CSS file. People that already have a theme selected, including “Default”, the them will NOT CHANGE. EVER AGAIN, unless they specifically set a new CSS file as their selected theme. This new methodology for setting a default theme of any name will allow future releases to create new theme files that fit the latest-and-greatest WordPress default theme without being disruptive to prior installs.

Now to figure out why customers with custom CSS themes are not having those themes automatically retained. That is on the “shrot list” for a future patch.

What Else Is New?

The location search performance is significantly improved for sites that use the “Ignore Radius” and “Ignore Radius if Address Empty” settings. This is a notable change in the query engine that will allow future add-on packs to build custom queries without creating site lag as more query types are added to the product. One immediate side effect is the forthcoming Enhanced Search autocomplete features. More on autocomplete in a future blog post.

ES 4.2.06 Enhanced Search Radius Behavior
Enhanced Search radius selector behavior.

Change Log

Posted on

Tweaking A Locator Theme

Map Guys Drawing Banner

The following is an outline of the steps that were taken to tweak the Above All Rev 01 theme for the PACCC website running on the Genesis News Pro theme from Studio Press.    This shows how a few simple settings and minor CSS updates are made to get the locator to offer a better user interface for the site visitors.

User Experience / Search Form 

– Set the address label to blank.   We will use placeholders to instruct the users.
– Change the radius label to “Radius”.
– Change the Name placeholder to “Search by name”.
– Turn on “Show Search By Name”.
– Set Pro Pack Tag Input to none.
– Add this custom CSS rule to fix the radius input label.
#address_search #addy_in_radius {
    width: 17%;
}
This gets the site to this point:

There are already some Tagalong categories set.   With only a few categories for the locations I decided to use a single drop down display to allow users to select the category in that fashion.
– Set Show Categories on Search to “single” as the drop down style.
– Set the Category Select Label to “Type of Counseling:”
– Add this custom CSS rule to fix the radius input label.
#tagalong_category_selector #cat {
    width: 24em;
}
This gets you to this point on the site:

About Categorizing/Filtering Locations

This will work for the current site configuration.    If you want to do a dual-option filter for the locations as shown on the comparison site then I suggest using a combination of Pro Pack tags and Tagalong categories.
Use Tagalong for complex / many-options categories for the locations in  your system.     ALWAYS use Tagalong for any type of category structure where it makes sense to have parent categories with children.   Whenever I have parent/children category structures I change the Show Categories option under Tagalong to “Cascading”.   In the example provided this would be the array of 2-dozen services provided with things like “Marital” as a parent category and “Premarital, Divorce, Children” as the subcategory.
Use Pro Pack for the simple options/categories on the locations.     I use this whenever a location only has a few options that I want users to pick from as a second filter on the locations.     In the example provided this would be the “Male Counselor, Female Counselor, Online Counseling”.

If you are only going to have ONE filter/selection criteria on the locations I suggest ALWAYS using Tagalong.   Tagalong is structured data and has less chances for data entry errors.     It is easier to fix category problems if you have lots of locations.    Over time Tagalong categories will continue to get new features and functionality.

Posted on

Store Locator Plus 4 & Customization Work

Add On Packs Banner

In between dealing with insurance adjusters and disaster recovery people all week, I’ve  managed to get some coding done.

Work continues on the customization project for a client along with a myriad of updates that are coming in the Store Locator Plus 4 release.     The admin interface has been changed in a lot of ways along with a number of admin-driven entries that impact how the map, search form, and results are rendered.

When Store Locator Plus 4 is released all of the add-on packs will require an upgrade.  This will be a PAID UPGRADE release for all add-on pack, not a free patch.    Users running Store Locator Plus 3.X with add-on packs for that major release will need to purchase the equivalent 4.0 compatible add-on packs before upgrading the base plugin.   Discount codes will be offered for recent purchases of the premium add-on packs, the discount amounts will be determined closer to the final release date.

Below is a preview of a custom WordPress theme (not available to the general public) combined with Store Locator Plus 4.0 features along with the 4.0 compatible paid upgrades to Pro Pack, Enhanced Results and Enhanced Search.    The “Beside Myself” Store Locator Plus theme is also used here, which will be part of the SLP 4.0 release.

Beside Myself Theme with SLP 4
Beside Myself Theme with SLP 4

Store Locator Plus themes only skin the Store Locator Plus elements.  They are not complete WordPress themes.  Think of them as “sub-themes” that affect only the map, search form, and results elements related to the plugin.

Store Locator Plus 4 - Selecting A Theme
Store Locator Plus 4 – Selecting A Theme
Posted on

Building A Site for Digital Content Sales

Today I received an email from a friend asking if I could help someone he knows in building a website.   The request is simple, help build a website that connects to social media and allows for registered users to download a paper he has written, keeping track of these registrations as leads.

The immediate answer is easy.

Use WordPress.

Ok, so maybe too simple an answer.   WordPress is way beyond a simple blogging platform.  It is a complete website and even a web applications building platform.   Take the website, glue on the right theme, add a few plugins, configure.  Done.

Far easier than 20 years ago when I built my first web engine for an ecommerce site,  writing thousands of lines of Perl code. It just about took a Phd in computer science to build a site like that back then.  Today, WordPress… click, click, type some settings, click… write some content… done.   But how do you get there?

Step 1: Pick A Host

This has come up TWICE today, so I’ll tell you who I use then tell you who I would and would not go with for most sites.

First, what I use.   Microsoft.  Yup, them.   Running a Linux server.    CentOS 6-something.  In a virtual dedicated server setup.  I know, I know… Microsoft and Linux?   Yeah.  And it didn’t even burst into flames within moments of doing the install.    So how does that work?     Microsoft has a service they call Windows Azure.   Don’t let the name confuse you.    “Azure”, as I like to call it, is basically the Microsoft equivalent of the Amazon Web Services environment.   In other words “cloud computing”.   It is NOT just Windows.

A Slight Diversion : Cloud Servers

What is the cloud?  A fancy name for remote computers and web services.  Really no different than rented servers from any other ISP, but today the term “cloud” tends to refer to any online service that gives you a simple web interface and programming APIs to control the resource.  This includes web hosting and web servers.   Just like the web servers you’d rent from an “Internet Presence Provider” (IPP) 5 years ago.   The only real difference here is they tend to put an emphasis on using virtual machines, just like those you run on a desktop like VMWare or Virtual Box.

That said, there are basically the same options with “cloud computing”, like “the cloud” provided by Amazon and Microsoft, as there are with renting a server.  You can get a website-only plan, a shared hosting plan, and a dedicated hosting plan.   This is sometimes called something different like “virtual private server” and “virtual dedicated server”.

In my opinion, if you are doing cloud computing then you really should be only looking at Virtual Dedicated Servers.  Otherwise just eliminate the confusion of “cloud computing” and go with a standard host.

If your website is going to be HUGE and you are going to get tens-of-thousands of unique visitors (uniques) every day or will have highly variable traffic with peaks of tens-of-thousands of uniques/day, then investigate and learn cloud hosting and dedicated cloud servers.

For the rest of you…

Back To Hosting

Ok, so I use a  Windows Azure virtual dedicated server running Linux.  But I’m a tech geek.  I know system security, system administration, and coding.  I can manage my server without any issues.

However, for a typical hosting company where you may need some assistance and do NOT need  your site to carry a super-heavy load, there are other options.    However, before I make a recommendation here are some companies I would stay away from for various reasons.

Do NOT use:

  • GoDaddy.   Way too many people have problems with GoDaddy hosted sites.   I cannot tell you how many broken sites of clients and customers were fixed when they left GoDaddy.    I also cannot tell you how incompetent it was for GoDaddy to take down MILLIONS of sites for several DAYS because they cannot configure a network router.   Then they refused any form of compensation to anyone.  I don’t even host with GoDaddy but my domain name is registered there and they took me offline for days.   This is NOT the first time this has happened in the past 12 months.   Not too mention most of their support staff is clueless.

  • LiquidWeb.   They  used to be one of my favorites.  As they have grown in size they too have grown in incompetence.  They cannot run a shared server properly to save their life.   I often found myself training their support staff.   They too have crashed my dedicated hardware, my shared server, and those of several customers for days-on-end.  No compensation and no apologies in most of those cases.
  • 1-And-1.   I’ve had no personal experience other than through my clients.  Mis-configured network routing.  Inability to fix blatant DNS issues.  Crashed servers.  Less performance that advertised.  Difficult to get in touch with competent support.  I’ve been paid good money to PROVE that 1-and-1 was the source of several major problems for clients for 1-an-1 to finally admit the issue was theirs then take weeks to address the problem.

Ok… so you know who to stay away from.   Who to use?

Well there are 2 companies I don’t have personal experience with but I’ve heard good things about.  The first, I only know about through casual conversation and what other people said about them.   The other is one many clients, with deep pockets, have used and swear by them.  I’m aware of them but have not used them personally.   In either case I think you are in good hands.

  • ClickHost.  They sponsored WordCamp Atlanta.  Already bonus points there.  They KNOW WordPress and love it.   If you are doing a WordPress site they seem like a perfect it.  Reasonably priced and WordPress knowledgeable.  Plus they just seem like cool people.

  • RackSpace.  They are the “100% guaranteed up time” people.   And from what I here they NEVER go offline.   They also have top-notch support.  And you pay for it.   Probably the most costly of the hosts  that are out there, but if your site can NEVER go down, they have a reputation for pulling that off.   Unless you screw it up yourself.  Then they try to help you fix it.

Step 2: Install WordPress

If you use someone like ClickHost, this is a few clicks and a couple of web-form questions away from being online.   Easy.

If you “go on your own” then you download WordPress, setup the MySQL database, and install via web forms.  Once you get MySQL setup, the 15-minute part of the “famous 15 minute install”, then the WordPress install really is just 15 minutes.  Very cool.

Step 3 : Themes

The harder part now is selecting a theme.    Themes are the skin of the site.  How it looks. There are tens-of-thousands of them online.  There are dozens within the free themes directory on WordPress.  There are a lot more out there in various online stores.  Some are free, some are paid.

But one thing most people overlook?   Themes are not just a pretty face.   MOST come with built-in functionality and features.  Think of it as a skin plus some cool functional elements added in.  While not all themes add functions or features to the site, many do.  Especially premium ones.

It is often easier to find a theme that does 90% of what you want and then add a few plugins.    Finding a theme that LOOKS cool, but does JUST that then adding 20 plugins is often a more difficult route.   If you follow my other threads you’ll know why.  Many plugins in the free directory at WordPress are abandoned.  Some don’t work well.  Others just don’t work.   Don’t let me scare you, plenty are GREAT and work perfectly.  You just need to “separate the wheat from the chafe” and that can take some time.

My recommendation?  Start with WooThemes.  I’ve found they have the best quality themes out there and more importantly, they actually ANSWER SUPPORT QUESTIONS.   Many themes, including premium ones, skip the later point which can be critical in getting a site online.      How to avoid at all costs?  Envato’s Theme Forest.  I’m sure they have a few good themes in the hundreds the promote, but the chances are finding those few are just too low.   Of the 10 “your plugin is broken” messages I get every month, 9 of them (or 10) are from someone using a Theme Forest theme that is horribly written and just plain breaks everything in their way.  Including plugins.   DO NOT use Theme Forest stuff.

Ok.  So you’ve got a theme, it does what you want and/or looks cool.       Now what?

Step 4: Plugins

Go find a few plugins that do what you want.  Start in the free WordPress plugins directory but widen your search to the premium plugins.  Unfortunately there are not a lot of good premium plugin sites out there.  However many of the better free plugins on the WordPress directory have premium upgrades.

Again, in the  3rd party market stay away from Envato’s Code Canyon.   While they offer a few good plugins there are far too many bad ones in the mix.    Not to hammer Envato too hard, they have a good idea but they SUCK at quality control.  They are obviously just playing a numbers game and going for volume over quality.

Got It, But For My Site?

Now you know the components, here is where I would start to build a site like the one described initially.

1) Host with ClickHost.  Small host package is probably fine.

2) Install WordPress 3.5.1 (or whatever the latest version is today).

3) Install WooCommerce as a plugin.  It is in the free directory and you can find it right from the WordPress admin panel by searching “woocommerce” under plugins.

4) Go to WooThemes and find a WooCommerce compatible theme that you like.

5) Go to WooThemes and look at the WooCommerce extensions.  There are several for doing subscriptions and digital content delivery.  They are premium add-ons but relatively inexpensive.

6) Add JetPack to your site.  It is a WordPress plugin from the guys that build WordPress.   It adds a bunch of cool features that you can turn on/off without much effort.  Mostly the social sharing and publishing tools are what we are looking for here.

7) Add VaultPress.  Also from “the WordPress people”. This is your site backup.  You want this.  Trust me, the $15/month is worth it the first time you break your site or it gets hacked.

I also strongly recommend adding Google Authenticator so you have 2-step authentication for your site.  It reduces the chances of someone hacking your password from the web interface.   This is not critical to functionality or security but I do recommend it.

So that is how I would get started.  I’ve not recommended specific themes or WooCommerce extensions because they change frequently and there may be something that better suits your particular needs.

Good luck and happy blogging!

Posted on

SLP “The Nice List” Themes

After spending time analyzing and dissecting problems with various themes and plugins it is time to list some of the themes used to test Store Locator Plus.    There are many good themes out there.  Unfortunately there are more than a handful of bad themes and even worse, there is no great service or directory that lists which themes are good, bad, or in between.   The rating system on WordPress is less-than-perfect being difficult to search and filter the thousands of listed themes.   Rather than tackle this very big  project of “a better theme directory”, I thought it best to simply provide some guideposts of the few themes I’ve interacted with and put them on the “Nice” or “Naughty” list.

The Nice List

Kaboodle

WooThemes Kaboodle theme also includes the Kaboodle Commerce child theme.  This is the theme the main CharlestonSW.com site uses.

Target

The default settings on the theme appear to work well with Store Locator Plus.    You will need to make sure you have a custom home page as the theme takes over the entire home page layout and content.  Thus, don’t make the SLP locations page your home page.

Twenty Ten

The default WordPress theme from the WordPress 3.3 series.

Twenty Eleven

The default WordPress theme from the WordPress 3.4 series.

Twenty Twelve

The default WordPress theme from the WordPress 3.4 series, current version 1.4.

Twenty Fourteen

The default WordPress theme from the WordPress 3.9 series, lets you create a responsive magazine website

 

 

 

Do you have themes you have used with Store Locator Plus that you like?  Please share them in your comments.

Posted on

SLP “The Naughty List” Themes

Between developing WordPress plugins and helping clients get their WordPress sites online I come across a LOT of themes and plugins.  Often I find myself chasing down bugs or interface anomalies and end up installing various themes and plugins on my development box for testing and problem isolation.  Along the way I’ve found a LOT of themes and plugins that misbehave.  In some cases the infractions are minor, in others it is surprising the software actually works.

You may also want to check out “The Nice List“.

The Naughty List

Here are my findings of those themes and plugins that mis-behave.  Please feel free to share your own in the comments.

Themes

Blanco, Theme Forest

Does not process jQuery function extensions (fn.extend) properly.

This theme has a hard-coded call to Google Maps in the header.php file.  It does not use the enqueue_scripts() method that is prescribed best practices for WordPress themes that load scripts.  This can cause conflicts with any plugins that provide Google Maps services.

Warnings and Errors

Notice: get_theme_data is deprecated since version 3.4! Use wp_get_theme() instead. in /home/wordpress/wp/wp-includes/functions.php on line 2638

Notice: 
Use of undefined constant etheme_add_admin_script - assumed 'etheme_add_admin_script' in 
/home/wordpress/wp/wp-content/themes/blanco/code/theme-settings.php 
on line 83
Notice: 
Undefined index: etheme_install in 
/home/wordpress/wp/wp-content/themes/blanco/code/demo_data.php 
on line 3

Elogix, Theme Forest

Mangles valid HTML in shortcodes inserting <br/> in the middle of HTML tags.

Goodspace, Theme Forest

Mangles valid HTML in shortcodes inserting <br/> in the middle of HTML tags.

Halycon, Rocket Theme

August 2012 release.   Numerous coding errors and hundreds of PHP warnings.   Does not enqueue javascript via the accepted best practices as set forth by WordPress.

Invictus, doitmax via Theme Forest

Does not properly load Google Fonts library, hanging the font and script loading process. (version 2.6.52)

If you enter a valid Google Developer API key to enable web fonts to stop the “infinite loading of Google fonts” the plugin generates an error message:

Warning:
Invalid argument supplied for foreach() in
/kunden/268552_55268/chem-tools/finestcare/wp-content/themes/invictus/doitmax_fw/includes/google.font.inc.php
on line 81

Warning:
Cannot modify header information - headers already sent by
(output started at /kunden/268552_55268/chem-tools/finestcare/wp-content/themes/invictus/doitmax_fw/includes/google.font.inc.php:81)
in /kunden/268552_55268/chem-tools/finestcare/wp-includes/pluggable.php
on line 876

Made, Theme Forest

Mangles valid HTML in shortcodes inserting <br/> in the middle of HTML tags.

Maxx, Theme Forest

Mangles valid HTML in shortcodes inserting <br/> in the middle of HTML tags.

Natural, Theme Forest

Mangles valid HTML in shortcodes inserting <br/> in the middle of HTML tags.

RT-9 Theme v 1.0.4 by Tolga Can via Theme Forest

  • PHP Notice:  Undefined variable: place in /var/www/wpslp/wp-content/themes/rt9/functions.php on line 47
  • NOTICE: wp-content/themes/rt9/index.php:25 – Use of undefined constant dwhich_home – assumed ‘dwhich_home’
  • NOTICE: wp-content/themes/rt9/footer.php:42 – Undefined variable: footer_pages
  • wp-content/themes/rt9/header.php:79 – get_settings is deprecated since version 2.1! Use get_option() instead.
  • PHP Deprecated:  Function split() is deprecated in /var/www/wpslp/wp-content/themes/rt9/header.php on line 121
  • PHP Warning:  include(): Failed opening ‘/var/www/wpslp/wp-content/themes/rt9/rttheme_options/includes.php’ for inclusion (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/wpslp/wp-content/themes/rt9/functions.php on line 2

RT-15 Theme by Tolga Can via Theme Forest

The IE check built into JavaScript is broken, causing all other scripts that load after script.js to break:

if(!jQuery.browser.msie){
Uncaught TypeError: Cannot read property 'msie' of undefined

RT-17 Theme by Tolga Can via Theme Forest

Various warnings and errors.While the SLP plugin does NOT do session management, ANY other plugin that does use session management (Events Manager, for example) will trigger a sessions error that will then cause the AJAX listener to break and thus make it appear that SLP is not working.   Neither plugins nor themes should be doing their own session management.
Notice: Undefined index: reset_settings in 
/home/wordpress/wp/wp-content/themes/rttheme17/rt-framework/classes/loading.php 
on line 302 

Notice: A session had already been started - ignoring session_start() in 
/home/wordpress/wp/wp-content/themes/rttheme17/functions.php 
on line 9 

Notice: Undefined offset: 0 in
/home/wordpress/wp/wp-content/themes/rttheme17/rt-framework/functions/rt_breadcrumb.php
on line 143

Notice: Trying to get property of non-object in
/home/wordpress/wp/wp-content/themes/rttheme17/rt-framework/functions/rt_breadcrumb.php
on line 143

Plugins

Events Manager

Version 5.3.1 fights with some themes that are also doing manual session management.  This causes the AJAX listener to break and thus SLP breaks.

MyReviewPlugin

Version 6.0.  Errors on replace() call in preview mode.  Bypasses standard Google Maps API call, instead force-loading the maps via a manual JavaScript call.  This is against Google Maps API best practices.

The Not-As-Naughty List

These are the themes and plugins with known problems that do not break outright but will “misfire” with the right combination of settings:

Themes

Clean Simple White by Mazznoer

Version 1.3.   Not checking named array indexes exist before testing.

Notice:
 Undefined index: page in 
/home/wordpress/wp/wp-content/themes/clean-simple-white/functions.php 
on line 69

iRibbon, CyberChimps

Deprecated functions.  Does not properly load JavaScript in some configurations.

Deprecated: Function ereg_replace() is deprecated in 
/home/wordpress/wp/wp-content/themes/iribbon/includes/options-functions.php 
on line 307


		
Posted on

WordPress Plugins – Is Charging A Fee GPL Compliant?

According to WordPress, asking for a fee in order to make a plugin easier to use is not GPL compliant. At least that is what we are being told with regard to our plugins and being de-listed from the official WordPress Plugins Directory. We can still sell our plugins directly via other venues and they will be fully functional within WordPress. However not being listed in the directory has two significant impacts on our business:

1) The WordPress Plugin Directory sends us 90+% of our sales leads. Without those leads we sell 90% less product. The volume of sales, not the price, is what makes it viable for us to continue to provide updates and support.

2) Without a listing in the WordPress Plugin Directory, existing users will not be automatically notified of updates. They will also not be able to click the “update” link for the plugin, thus requiring a manual download and installation of our .zip file for the plugins which makes their life more difficult.

Neither of these situations are good for us or our clients. The sad part of this whole thing is that we embrace GPL and want to be good members of the WordPress community.

However, based on the tone of the messages posted by the WordPress Plugin Czars, they don’t want anyone pushing people to pay for plugins. They want it to be a 100% pure “from the good of my heart I’ll give you money” donation based system.  We know from experience that people simply will not donate.   Our first plugins generated ZERO donations.    The very same plugins, after adding the “license fee”, generated a dozen sales the first PARTIAL month with no other code changes in place.  Same plugin, infinitely better results.   The general mantra for most plugin users is “Why buy the cow when you can get the milk for free?”.

Until and unless we can get this issue resolved with the powers-that-be over at WordPress, we are going to be left with some very difficult decisions.  One of the options, and the one we like the least, is to drop WordPress plugin offerings completely. If we remove the fee and are allowed to be put back on the WordPress directory as a donation-only system, the support requests from non-paying users becomes overwhelming and kills our daily productivity.   As such the most likely option is that we will need to pull the plugin products from the directory completely, in which case we may as well leave the fee in place and remain de-listed.

WordPress Assertions Are WRONG

However, we feel as though this entire situation should never have come up in the first place. WordPress has stated that we have been removed for creating our own license (a false assertion) and seem to indicate that we must remove our request for a fee in order to be GPL compliant (an incorrect interpretation of GPL).   Here is the letter from a WordPress representative to us regarding the de-listing of Store Locator Plus:

Hi,

You wrote your own licensing terms.

All plugins must be GPL or compatible.

I can see other plugins of yours are doing the same.

This is not permitted.

1. All plugins must be released under the GPL or compatible. This must be stated in the plugin download.

2. A fee to ‘unlock’ is not permitted

3. A fee to in any other way alter the plugin is not permitted

A plugin must be fully functional, not a trial, free and the user must be allowed to change the plugin code if they wish.

If you can change all your plugins that need this without delay then this plugin can be replaced and others not withdrawn.

Thanks

Mark

This is blatantly wrong on several counts, we’ll visit each one below.

“You wrote your own licensing terms.”

This is a combination of statements that all combine to make this argument including:

“You wrote your own licensing terms.

All plugins must be GPL or compatible.

I can see other plugins of yours are doing the same.

This is not permitted.

1. All plugins must be released under the GPL or compatible. This must be stated in the plugin download.”

We wrote our own licensing terms?  Really?  Where?  It is clearly stated throughout that we are licensed under GPL.   The plugin IS GPL COMPABTIBLE. You must be GPL compatible to be listed.  We are.   That point is a non-start and frankly quite ridiculous.

From the plugin itself:

/*
Plugin Name: Store Locator Plus
Plugin URI: /products/store-locator-plus/
Description: Store Locator Plus is based on the popular Google Maps Store Locator with a few customizations we needed for our clients. Hopefully other WordPress users will find our additions useful.
Version: 1.9
Author: Cyber Sprocket Labs
Author URI: /
License: GPL3

Copyright 2010  Cyber Sprocket Labs (info@cybersprocket.com)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

*/

A Fee To Unlock Is Not Permitted

This is a statement that wraps these comments together as they all speak to that point:

2. A fee to ‘unlock’ is not permitted

3. A fee to in any other way alter the plugin is not permitted

A plugin must be fully functional, not a trial, free and the user must be allowed to change the plugin code if they wish.

A Fee To Unlock Is Not Permitted

OK, we agree that having to enter a “license key” (or a “donation key” if you prefer) does “unlock” certain features.  But that is a gray area in-and-of-itself.  First of all the plugin is 100% functional as presented.   We have simply hooked into the shortcode processor so that you must be logged in as a user with admin privileges for the shortcodes to render on pages.  That means visitors won’t see the shortcode output.   You have two options, edit the line in the code that checks the key was entered or send us a donation and put the key in the web based entry box on the admin panel and everything renders to visitors as well as admin users.

Second, and MOST IMPORTANT, where is this policy stated? We sure as heck couldn’t find it.  In fact this quote is directly from the WordPress Developer Center where you register for plugins:

There are only a few restrictions

  1. Your plugin must be GPLv2 Compatible.
  2. The plugin most not do anything illegal, or be morally offensive (that’s subjective, we know).
  3. You have to actually use the subversion repository we give you in order for your plugin to show up on this site. The WordPress Plugins Directory is a hosting site, not a listing site.
  4. The plugin must not embed external links on the public site (like a “powered by” link) without explicitly asking the user’s permission.
  5. If you don’t specify a v2-compatible license, what you check in is explicitly GPLv2

That’s it in its entirety.  Where does is say ANYTHING about “fee to unlock is not permitted”.   We’ve searched the forums, the entire developer directory, the FAQs.  NOWHERE is this policy stated.  When did this become an issue?

A Fee To In Any Way Alter…

The plugin is not altered in any way.

 

A plugin must be … not a trial… free… allowed to change….

The multi-part comment regarding this point:

A plugin must be fully functional, not a trial, free and the user must be allowed to change the plugin code if they wish.

Let’s start with the easy ones:

Not a trail.
Definitely Not.

Fully functional.
It is.  All the features work and none are missing.  Yes, you can only see certain output as an administrator before you enter a donation fee, but is that non-functional?   Absolutely not.  There are dozens of plugins and built-in WordPress functionality that restricts what people see based on their role.  In fact, the WP3.0+ builds do that very thing.  Admins see a menu bar on the pages while logged in and browsing, but visitors do not.  Is that not fully functional because visitors can’t see some content?

No, we are not being intentionally naive here.   We know that entering the code you get after sending in a payment changes how the plugin works.  However we are not ADDING anything or removing anything.  All the pieces are there.  Don’t want to pay?  Simply edit the one-line of code that checks the donation code was entered.    Everything is there.

By the same token, what about the thousands of plugins that have add-ons?   Those plugins are purposefully nutered when put on the WordPress directory.  You must pay to get feature X or feature Y.   So it is OK to ask for money so you can download the other pieces that make the plugins complete?   If you ask us, THAT is truly not fully functional.  You can’t even turn on those features if you wanted to because you don’t have the CODE.

We give EVERYONE ALL THE CODE UP FRONT whether or not they pay us.   Seems like a better way of doing this to us, but  unless the WordPress people simply missed those 5,000+ plugins that do the limited features/pay us for the extras, it would appear they prefer we send crippled, half-there products and ask for an “add on” fee instead.

It must be free.
What?!?!?!? Who says?

Certainly not GPL.   And DEFINITELY not the guys that started WordPress.   Even Matt Mullenweg, the guy who basically started it all, does not think that add-ons to WordPress should be free. There are multiple recorded conversations about this topic and how people should be allowed to profit on their work based on WordPress extensions including themes and plugins.  The transcript from the Thesis “battle” is just one of many references to this topic.

GPL clearly states that you CAN CHARGE for products licensed under GPL.   Excerpts from the GPL Preamble (the plain speak summary of the legal-speak to come later in the document):

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish)…

Many people that read the GPL simply do not get it. They always equate the word free to the monetary value of something, in essence what you pay to obtain it.   Thus too many people read the GPL and immediately start jumping up & down and waving their fists in the air saying “YOU CANNOT CHARGE MONEY FOR THIS!!! IT IS GPL!!!!”.    That, quite frankly, is an imbecile in action.   READ THE GPL.  Read it carefully.  UNDERSTAND THE GPL.   And if necessary, get a clue.

Benefit Of The Doubt

For now we are going to give the guys that are playing god over at the WordPress Plugin Directory the benefit of the doubt.   We’ll assume that maybe they have a policy that you absolutely cannot charge for a plugin or that you cannot have a role-restricted section of the plugin.   If this is the case then WordPress needs to update their plugin listing requirements before other developers spend countless hours like we did writing code only to be banned shortly after they put them online.

Hopefully they did not do what a lot of other clueless GPL Must Be Free flag-waving idiots do, and equate the term “free” in the GPL with “you cannot charge a price”.   Given the WordPress founder’s obvious affinity for upholding and promoting GPL as “how things should be done” would truly be a sad declaration.   His own minions don’t get it.

Tell Us What You Think

So what do YOU think? Is our position wrong?   Should we just be giving away all our work for free; allowing unfettered access to everything we do and HOPE for donations?   If so, what fixes do you suggest for getting people to actually send in donations?  There are thousands, literally thousands, of ex-WordPress plugin developers littering the WordPress landscape for one sole reason: the donation system failed them. If you’ve got the magic panacea please share so everyone can discuss.

If you agree with us, then let the people at WordPress know.  Write to the plugin people at plugins@wordpress.org or ping Matt Mullenweg via his blog contact form.

If you know someone at WordPress who might listen to our viewpoint and possibly be willing to work with us to keep us listed, please let us know.

Update

We just learned that the person that kicked us off the WordPress listing is the very same person that did this a year ago.   He is also the very same guy that got ahold of one of our requests for a new plugin namespace,  before we had ANY information other than a short description of what it would do, and held up the request for 3 weeks (it normally takes 24-48 hours).   We got someone else at WordPress involved both times & they made things right.

If anyone knows Mark Riley please try to talk to him. If you don’t know him please ping him at his blog or via email and ask him to please support plugin developers that are trying to play by the rules.

Mark Riley
aka “Romantic Robot”
aka “Podz”

Leicester UK
d/o/b: June 5th, ????

http://wordpress.org/support/profile/podz
http://www.tamba2.org.uk/
http://romanticrobot.net/

Mark Responds

We finally got a response from Mark.   Our only question is where is this “if it isn’t free it can’t be listed in the directory” rule posted?  It certainly isn’t on the requirements to be listed page.  At least not today, yesterday, or any day in the past 18 months.

Here is Mark’s response as posted on the WordPress Forums thread (http://wordpress.org/support/topic/disappearing-plugin-listings?replies=9#post-2114268)

Anyone can charge for plugins, or themes, or other code. There are lots of people doing this very successfully for people who use WordPress. But no theme or plugin that wants to charge can be listed in the directory.

If you want to offer the plugins free and without conditions that would be great and they will be re-included after you have made the changes to the readme.txt
If you would prefer to ask for the fee then they cannot be re-included.

It’s that simple.