WordPress Google Form v0.46 beta 10 now available

A user recently reported a very odd issue where their server would report a 505 error when visiting the WordPress Google Form Plugin Settings Page.  Having never seen this sort of behavior, I was somewhat stumped.

The user had a test server I was allowed to access and I was able to narrow the problem down to a call to preg_match_all(), a standard PHP function.

The plugin settings page scrapes some content from the WordPress plugin repository and puts it on a tab within the Plugin Settings Page.  The call to preg_match_all() involved a fairly complex regular expression to extract just the content I wanted.

It turns out there is an undocumented WordPress Plugin API which makes extracting this same date extremely simple.  This beta release incorporates the API and eliminates the call to preg_match_all().  The solution is much cleaner, wish I would have known about this sooner!

Download the beta release and please let me know if you run into any issues.

Google Forms Beta (8833 downloads )

Email-Users 4.4.2 released

Yesterday I released an update to Email-Users which addressed a problem when using the Email to Groups function.  Too many users were incorrectly being selected as part of the group due to an initialization bug which has been fixed.

You can find the update in the WordPress Plugin Repository or via an update on your WordPress Dashboard.

Email-Users 4.4.1 finally released

This morning I incorporated the updated French language files and released Email-Users 4.4.1.  This release fixes a number of issues people were having and introduces new functionality (via filters) to target specific groups of users based on their User Meta Data.

Here is a list of the key changes for this release:

  • Added German translation files (thank you Tobias Bechtold).
  • Fixed bug in Send to Groups where number of users receiving email was wrong.
  • Added internationalization support to Send to Group status messages.
  • Added support for sending email to users based on a custom meta filter.
  • Added support for sending email to groups based on a custom meta filter.
  • Added suppport for providing a bounce email address.
  • Fixed bug in Options form which prevented translation of strings.
  • Added support for defining email group meta filters based on meta key.
  • Implemented solution from @maximinime to fix lost Email-Users settings.
  • Removed invalid references to Marvin Labs.
  • Fixed bug where Post Excerpt wasn’t being used in email when present.
  • Updated French and Spanish language files.

Thanks to all of the people who have tested the various beta releases and provided the language file updates.  The WordPress Plugin Repository has been updated and the update should appear on  your WordPress Dashboard soon.

Email-Users v4.4.1-beta-6 now available

This morning I updated the beta version of Email Users 4.4.1 to beta-6.  This version incorporates updated Spanish and German language files and fixes a few remaining links within the plugin which referred to the old plugin home page on <a href=”http://www.marvinlabs.com”>MarvinLabs.com</a>.

I had hoped beta-5 would be the final beta release however I am still waiting for updated French language files before 4.4.1 is released.  Updates to other languages are welcome too however I no longer have the contact information for the Russian and Persian support files.

Email Users Custom List (5806 downloads )

Please download and test the beta release.  Report back any issues and I’ll do what I can to fix them quickly.

Email Users Beta (5678 downloads )

Email-Users v4.4.1-beta-5 now available

This morning I updated the beta version of Email Users 4.4.1 to beta-5.  This version updates a number of the links within the plugin which referred to the old plugin home page on MarvinLabs.com which are no longer in existance.

I hope this is the final beta release before 4.4.1 goes out.  All I am waiting for is some updates to language translation files.

Email Users Custom List (5806 downloads )

Please download and test the beta release.  Report back any issues and I’ll do what I can to fix them quickly.

Email Users Beta (5678 downloads )

Email-Users v4.4.1-beta-4 now available

This evening I updated the beta version of Email Users 4.4.1 to beta-4.  This version addresses the issue with user settings reverting which was reported here, here, and here.  I have implemented the solution proposed by @maximinime on the WordPress Support Forums.

Email Users Custom List (5806 downloads )

Please download and test the beta release.  Report back any issues and I’ll do what I can to fix them quickly.

Email Users Beta (5678 downloads )

Odd behavior with PHP’s method_exists() function

I recently had a report from a user that many of the pages within the wp-SwimTeam plugin were blank.  This is odd and incorrect behavior but I have seen it before.  When I last chased it down I found that the way various versions of PHP 5.2.x and 5.3.x handled Constructors was different and in some versions Constructors in parent classes would be called and in some versions they wouldn’t.

I assumed this new report of blank pages meant that I had missed one of these Constructor issues somewhere.  It turns out that wasn’t the case.  This time I found that PHP’s method_exists() function behaves differently between different versions of PHP on different platforms.

The report came in from a site running PHP 5.3.13 which is the same as what I am running in my development area.  The only difference I can see between the two servers is mine is running on Windows under IIS where as the problematic site is running Apache under Linux.

When a page is rendered for wp-SwimTeam, the objects on the page are traversed and HTML code is generated.  The objects which comprise the page content can either be strings (HTML code) or objects themselves which then traversed recursively until all of the leaf HTML is assembled.  This is core functionality in phpHtmlLib that I have been using for years without any issues until now.

What I found was that if the variable passed to method_exists() was a string instead of an object, PHP goes out in the weeds and never returns which ultimately results in the blank page.  This is the code that has been rendering objects in phpHtmlLib for 10+ years:

if (method_exists($item, "render") ) {

It was fairly simple to fix it.  By checking to see if the item is an object prior to checking for it’s render method, the problem is resolves and the page renders correctly.

if (is_object($item) && method_exists($item, "render") ) {

I will be updating phpHtmlLib with this fix shortly.

Email-Users 4.4.1-beta-3 available

This afternoon I updated the beta version of Email Users 4.4.1 to beta-3.  This version improves the Custom Group filter options by introducing a new Custom Group Meta Key filter.  It builds on the Custom Group Meta Filter but eliminates a lot of the work required if a filter on a Meta Key is desired instead of a Meta Key and Value pair.

For example the following code will yield a Send to Group Form with selections based on any possible value of a User Meta Key by the name of ‘department’:

add_action( 'mailusers_group_custom_meta_key_filter', 'send_to_departments', 5 );
function send_to_departments()
{
mailusers_register_group_custom_meta_key_filter('department', null, 'send_to_departments_label');
}
function send_to_departments_label($mk, $mv)
{
return(ucwords($mk) . ' = ' . ucwords($mv)) ;
}

The only required argument is the first one, which is the name of the Meta Key.  The second argument is an optional Meta Value and the third argument is an optional callback which accepts two strings, Meta Key and Meta Value, and returns a string which is used as the selection text on the form.

EU_SS_07

I have updated the example plugin again to create the filter which results in the image above, the examples I have done previously are still in the file however are commented out.  You can download it and drop it into  your plugins directory to see menus like shown in the beta-1 post.

Email Users Custom List (5806 downloads )

Please download and test the beta release.  Report back any issues and I’ll do what I can to fix them quickly.

Email Users Beta (5678 downloads )

Email-Users 4.4.1-beta-2 available

I have uploaded v4.4.1. beta-2 for Email Users.  This version changes the custom filters previously defined to be a “user” filter and introduces a “group” filter.  If you have used the “Send to Group” feature, you can now define a series of filters that you can send to.   There are examples of sending to the “Police” and “Fire” departments in the example filter plugin (see below).

EU_SS_06

I have updated the example plugin to create the filters, you download it and drop it into  your plugins directory to see menus like shown in the beta-1 post.

There is also a new option on the plugin settings page to control where bounced emails are sent.

Email Users Custom List (5806 downloads )

Please download and test the beta release.  Report back any issues and I’ll do what I can to fix them quickly.

Email Users Beta (5678 downloads )

Work-Around for Google Forms problem

It is no longer necessary to use this work-around, the WordPress Google Forms plugin now supports the new version of Google Forms.  This post remains here are part of the development history of the plugin.

Thanks to a tip form Kevin Dillon, a work-around to the problem with new Google Forms has been identified!  Legacy Google Forms are still available IF you start creating the form by opening a SpreadSheet first.  Once the spreadsheet is open, select “Create a legacy Form” from the “Tools” menu.  The form editor and published URL will be the same as those that had worked prior to the Google Forms update.

wpGForm_SS-002wpGForm_SS-003