Shortly after releasing v0.64 I received a report of data corruption from a Google Forms user. I took this report very seriously and immediately reverted the stable tag for Google Forms back to v0.63 while I looked into this users report. The last thing I wanted to do was introduce a bug which resulted in corrupted posts.
I spent some time looking through my plugin code and tried a couple experiments but could not replicate the behavior the user reported. My gut feel was we’re dealing with a plugin conflict however it is hard to know for sure.
The user and I ended up swapping some email and I got a list of plugins they were running. I initially thought I would try and replicate their problem by installing the same set of plugins but quickly figured out that wasn’t possible. Nor was it possible to examine all of the code for the plugins looking for what I suspected was a conflict in a “save_post” action or call to wp_update_post().
In doing some research I learned (unfortunately I can’t find it in the Codex) that beginning in WordPress 3.7 there is a new save_post action for Custom Post Types: save_post_{$post_type} Whoo-hoo! This didn’t exist when I originally wrote Google Forms, so my plugin, much like many other plugins which define Custom Post Types, define a save_action which then has to determine if the post is relevant to the plugin or not before doing anything to it.
I quickly implemented the new action and removed the old action and Google Forms is behaving as it should in my testing. I have uploaded this latest beta to my site and beat on it a bit and cannot corrupt any data. I am very confident now that Google Forms should never touch anything other than it’s own post data.
Because of the reported corruption, I would encourage beta testers to backup their database before installing this update JUST TO BE SAFE but I think the corruption risk is very low. Please let me know if you run into anything unusual.
In this v0.65 beta I have also changed the name of the plugin from “WordPress Google Form” to “Google Forms” as it is more representative and the plugin repository now prohibits the use of “WordPress” in a plugin name. There is a chance you’ll have to reactivate the plugin depending on how you install this beta.
Google Forms Beta (31806 downloads )