What? Another beta release? Yes. A few weeks ago I had a report from a user who ran into a problem with WordPress Google Form running under PHP 5.4.4-14+deb7u2. None of the values in the form were being submitted to the target spreadsheet. The user was able to resolve the problem by changing how I was calling wp_remote_post() and sent me a DIFF file.
Unfortunately I had already started working on the changes I made to support multiple form instances (v0.61, v0.62) and the diff file couldn’t be applied to my source tree. I then forgot about it in my effort to get v0.61 out which had a number of other fixes in it that were affecting quite a few people.
Over the weekend I received a couple more help requests from people who had forms submitting that didn’t result in any data in the spreadsheet OR if the fields were required, messages indicating they had unanswered questions.
In looking at one of these sites in detail, everything looked correct on the WordPress side. This site has the Suhosin security module installed. I’ve run into Suhosin before but I couldn’t find any comments in my code nor any references to it on my web site. I am guessing that I was never able to fix the problem when I ran into it previously. In reading about Suhosin again, I recalled the patch which was sent to me a couple weeks ago.
My suspicion is that the way I was constructing the arguments to wp_remote_post() isn’t palatable to some versions of PHP. I decided to implement the changes that the patch had incorporated and see if it would address the problem. The change involves constructing the body argument as an array instead of a long URL formatted string. This is the right way to do it and it makes the code a little cleaner when needing to look at the parameters passed to wp_remote_post().
I was able to incorporate the patch by manually finding the corresponding source code lines in my current version and accounting for the changes I have made in the past month and get a beta release together fairly quickly. This fix allows the test form on the sites (one running PHP 5.4.6, one running PHP 5.3.10-1ubuntu3.8 with Suhosin-Patch).
If you want to try out this latest version, I would appreciate any feedback.Google Forms Beta (190 downloads)