Email-Users v4.6.3-beta-11 available

I have just posted beta-11 of Email Users v4.6.3.  This beta version has quite a bit in it, new functionality and bug fixes:

  • CSS fixes to the settings page so the Editor boxes don’t over flow into the right hand column.
  • Integration support for the Paid Memeberships Pro plugin.
  • Language file updates.
  • Empty User Groups from the Groups plugin are no longer displayed when sending group messages or notifications.

Please do some testing with this build, I would like to release it fairly soon.  I have limited knowledge of Paid Memberships Pro so it could use some testing.  My experience with PMP is it is pretty fragile, I had to mess with my WordPress database just to get users assigned to PMP groups.

Email Users Beta (224 downloads)

wp-SwimTeam v1.42-beta-1 available

I recently had a report from a user regarding a problem importing a HYV event file.  This event file was using Event Numbers with a one character suffix (in their case A-J).  I didn’t know using a character suffix was a legal event number and had never encountered one previously.

It turns out it is fairly common, particularly with High School and YMCA teams.  Since the database had defined the Event Number as an integer field, adding support for these “suffixes” as I am calling them wasn’t simple.

This build of wp-SwimTeam adds support for non-numeric Event Numbers and needs testing.  I have added, updated, imported, and deleted event numbers and all seems to be working correctly.  I have also exported SDIF and HY3 entry files which also look correct.  However, I would appreciate some testing from someone who is more familiar with these sort of event numbers than I am.

Please checkout the beta release and provide feedback on any problems you encounter.

wp-SwimTeam Beta (339 downloads)

Google Forms v0.64-beta-3 available

This evening I uploaded v0.64-beta-3 of Google Forms.  This version adds a check for the WordPress HTTP API cURL transport and issue a notification if it isn’t present.

There was a substantial change to the WordPress HTTP API between 3.6.1 and 3.7.  I don’t know the full details of the change but what I found in pretty extensive testing is the streams and fsockopen transports work in 3.6.1 with the Google Forms plugin but from 3.7 and later, they do not.

However, the cURL transport does work and as long as it is available, the plugin will work as it always has.  The problem is I cannot find any way to work with sites that don’t have the cURL transport available so I have added this check and issue a notice when it isn’t present.

GForm_SS_70

 

Please download and test out this beta version and report any issues found.

Google Forms Beta (450 downloads)

Chasing Checkbox Support

For the past couple of days I have continued to look at the problem I wrote about with Google Forms and Checkboxes with PHP 5.4 and PHP 5.5.  It turns out, that it really isn’t PHP version related, at least I don’t think so.  It is WordPress related as near as I can tell.

As I’ve written before, I love VMware Workstation as it allows you to create virtual machines for very specific purposes, use them as long as needed, then put them away until needed again.

I created an Unbuntu VM to play with Ruby on Rails a couple months ago so I decided to check what version of PHP it had running.  Lo and behold, it had PHP 5.5.x running so it was a good platform to further test potential solutions for my checkbox problem.  My Windows environment is running PHP 5.3.3 and is still running WordPress 3.6.1 (don’t ask why but it proved to be very useful that it was).

I quickly set up WordPress 3.8 on Ubuntu and sure enough, submitting the form failed.  The exact same plugin code on my Windows VM submitted correctly.  I continued to dig through my code and eventually into WordPress itself trying to see what was different.

I eventually started looking at the source to wp_remote_post() and decided to identify which transport was being used.  On Windows WordPress was using cURL but on Ubuntu it was using Streams.  Ah-ha.  Since the WordPress HTTP API abstracts the details of the transports away from the application, it shouldn’t matter but it seems to.  I continued digging.

Using an advanced feature of WordPress Google Form to control transports, I disabled the cURL transport on the Windows machine and much to my surprise, the form still submitted correctly.  Now this is odd.  So I then installed cURL on Ubuntu and the form submitted correctly.  The good news is there at least appears to be a solution although I’d prefer to not have cURL be a requirement.

Now what was different?  I started looking into WordPress’ class-http.php file (which defines the WP_Http class) and noticed that the file on Windows was very different than the file on Ubuntu.  Looks like something changed between 3.6.1 and 3.8.1.

I decided to download the 3.6.1 and 3.7.1 releases from the WordPress archive and do some tests on Ubuntu where it is trivial to switch between WordPress releases.

To add a little more information, I did some testing with older versions of WordPress in combination with the http_api_transports to force a specific transport (‘streams’, ‘fsockopen’, and ‘curl’).  I found the following results:

WordPress 3.6.1 WordPress 3.7.1 WordPress 3.8.1
cURL Success Success Success
fsockopen Success Fail Fail
streams Success Fail Fail

Something clearly changed with the streams and fsockopen transports between 3.6.1 and 3.7.1.  A diff of the class-http.php file shows the change was substantial as the files are significantly different.

At this point I have concluded that my plugin will only work with sites where cURL is available.  I will probably release a version which displays a warning on the Dashboard if cURL is not available and that usage of the plugin is not recommended.

Google Forms, Checkboxes and PHP 5.4 or 5.5

WordPress Google Form v0.63 introduced a change  which allowed the plugin to work on newer versions of PHP, notably 5.4 and 5.5.  Unfortunately that change has broken support for checkboxes.

For those who are new to the plugin or never needed to know how it worked, what the plugin does is retrieve the HTML for the form from Google and render it within the context of WordPress.  When the form is submitted, it is actually submitted within the context of WordPress.   The data is collected by the plugin and then submitted to Google.  The retrieval from and submission to Google is done with the WordPress HTTP API.  In particular, the wp_remote_get() and wp_remote_post() functions are used to retrieve and submit the form.

To complicate the problem further, Google uses Python as the backend for their form processor where as WordPress uses PHP.  For the most part, the fact that they are based on different scripting languages isn’t a big deal.  Until you get to checkboxes.  Checkboxes in Python are handled differently than they are in PHP.

I had solved the compatibility problem a couple years ago (see this thread on the wp-hackers mailing list) using a small jQuery script which fixed the form variables on the WordPress side and manual construction of the body parameter for wp_remote_post() when submitting the data to Google.  This solution worked fine until I received a bug report that nothing was being submitted on a site which was running PHP 5.4.x.

Fortunately the user who encountered the problem provided me with a patch that I was able to fold in which changed the way the body parameter was constructed (array instead of a string) which worked with PHP 5.4.x and also worked with older versions.  However, I didn’t test it thoroughly as I have had several reports that checkbox content was not being submitted correctly.  Uh-oh.  I was able to verify the problem fairly quickly and was able to push out a version which essentially reverts how the body parameter is constructed (string instead of an array).  The problem is, this build doesn’t work with newer versions of PHP.

I have PHP 5.5 running on an Ubuntu virtual machines for testing and so far, I have not found a solution which (a) works with PHP 5.5. and (b) submits checkboxes correctly.

Stay tuned.

WordPress Google Forms v0.64-beta-2

This evening I released beta-2 of the upcoming v0.64 release of WordPress Google Forms.  This build addresses a problem recently reported on the Support Forum where the responses for checkboxes wasn’t being recorded properly.

I was able to verify this problem using one of my test forms and began looking into it.  It turns out, the changes made in v0.63 to allow the plugin to work with later versions of PHP 5.4 breaks the ability to uses checkboxes.  This build employs a similar method of submitting parameters to Google that versions prior to v0.63 did.

Handling checkboxes has long been a challenge due to the different ways which Python (used by Google) and PHP (used by WordPress) handle the assignment of checkbox values to a named parameter.

Please download this build and test and let me know if you run into any issues.

Google Forms Beta (450 downloads)

Email Users v4.6.3-beta-9 available

Update:  Around noon EST I updated the build to beta-10 to fix another bug.

This morning I posed beta-9 of the upcoming Email Users v4.6.3 release.  This build includes an updated Spanish translation as well as several new options for the BCC Limit setting targeted at sites with very large numbers of users (e.g. 4k, 13k, etc.).

This build also moves some debug code I have been using to chase down the memory issue under the control of the Email Users Debug setting (which is on the plugin settings page – Dashboard->Settings->Email Users).  I have found this code to be really useful chasing down this odd memory problem however I don’t want it running all the time so putting it under the control of the debug setting makes sense.  When debug is enabled, if you choose the “Send to Users” menu (Dashboard->Email Users->Send to Users) and examine the source HTML code for the page, you will find a section of code which looks similar to this:

<pre id="line1">				<select id="<a>send_users</a>" name="<a>send_users[]</a>" size="<a>8</a>" style="<a>width: 654px; height: 250px;</a>" multiple="<a>multiple</a>" >
				<!-- email-users.php::1010 -->
<!-- email-users.php::1058 -->
<!-- email-users.php::1059 -->
<!--
Array
(
    [total_users] => 805
    [avail_roles] => Array
        (
            [administrator] => 1
            [contributor] => 4
            [editor] => 2
            [subscriber] => 798
        )

)
 -->
<!-- email-users.php::1061 -->
<!--
Array
(
    [exclude] => 1
    [fields] => Array
        (
            [0] => ID
            [1] => display_name
        )

    [offset] => 0
    [number] => 500
)
 -->
<!-- email-users.php::1063 -->
<!-- email-users.php::1082  Query #1  Memory Usage:  20.5M -->
<!-- email-users.php::1082  Query #2  Memory Usage:  20.5M -->
<!--
805 -->
<!-- email-users.php::1116 -->
					<option value="<a>308</a>" ></pre>

This sort of information is tremendously helpful when chasing down odd behavior.

I am hoping to get a couple more translation updates before I do the v4.6.3 release along with some testing from a couple of sites with large user counts.  In the meantime, you can download the latest beta version here.

Email Users Beta (224 downloads)

Email-Users v4.6.3-beta-8 now available

I have just uploaded beta-8 of Email Users v4.6.3.  This build addresses an unusual out of memory situations which affected sites with very large numbers of users.  You can find a detailed write up of the problem here.

The change s required to address this problem are pretty substantial so I would appreciate any testing people can do, I don’t want to break anyone’s email system!

Email Users Beta (224 downloads)

WordPress Google Form v0.61 is out!

After a couple days of testing and five beta releases, I have released WordPress Google Form v0.61.  This build supports multiple instances of the same form on a single page.

Why would you do this?  It turns out, it is a fairly common request.  A number of people have uses of the same form where some of the fields are hidden and preset (both features were added fairly recently) which allows them to present the form in different ways with seeded input while allowing the user to complete the rest.  Because the form instances are all based on the same Google Form, they will have the exact same entry elements with the exact same attribute IDs.  HTML does not allow multiple elements to have the same ID attribute, the behavior is unpredictable.

To support this new feature, a new parameter, uid, has been added to the wpgform shortcode.  The uid parameter can be set to any string which is legal for an HTML element ID attribute.  When the Google Form is processed, all of the attributes are modified to include the uid parameter to ensure they each have a unique value.

[wpgform id='879' uid='B-']

GForm_SS_69

This release also addresses some issues with missing CAPTCHAs which would happen under certain circumstances.  The jQuery generation is much cleaner now as well.

You can find this update in the WordPress plugin repository or on your WordPress Dashboard.

WordPress Google Form v0.61-beta-5 available

Another beta update, #5, for WordPress Google Form v0.61.  This update fixes a couple more issues with validation which resulted in some extra jQuery content that was malformed.  It only happened IF validation was enabled but no custom validation rules were defined.

Google Forms Beta (450 downloads)