Google change to breaks WordPress Google Form

Last week Google introduced a significant update to Google Forms.  In addition to a very different UI, the format of the public URL has changed AND more importantly, it has broken my WordPress Google Form plugin.

The change only seems to affect forms created from scratch using the new version of Google Forms.  My plugin is dependent on the WordPress HTTP API to retrieve the form from Google and with the new URL format, the API is returning an error.  I am trying to figure out what Google doesn’t like.

What is odd is I am able to successfully retrieve the form using the wget utility (a Unix command line tool for retrieving remote content) however wp_remote_get() doesn’t work.

I wish had some better news to report but right now I am stumped as to why this isn’t working.

If anyone has any ideas, I have posted some of the low level debug stuff on PastBin.

19 thoughts on “Google change to breaks WordPress Google Form

  1. Absolute long shot here, but it isn’t something to do with the sslverify argument in HTTP API is it?

    The ‘sslverify’ argument was added in Version 2.8 and will check to see if the SSL certificate is valid (not self-signed, actually for the site in the request) and will deny the response if it isn’t. If you are requesting HTTPS and and know that the site is self-signed or is invalided and are reasonably sure that it can be trusted, then set to false.

    • I do have sslverify set to false. I am not sure why it doesn’t show up when I dump the args array with print_r() but I have noticed that with other variables which are Boolean and false. For some reason the Google ServiceLogin seems to be kicking in and I am not sure why.

  2. You can still create legacy google forms via the spreadsheet. This is a good temporary work-around that generates a form with the formkey. The new forms don’t seem to use this formkey.

    • Thanks for posting this – I just tried it out and it works just like it used to. I am going to write this up with some screen shots.

      • Mike, My pleasure. I just implemented your plugin a few days ago and these changes Google was making was driving me crazy. I’m glad you are looking into a longer term work-around. This is a great plugin you wrote and I hope you can continue to make it work!

  3. Pingback: | Work-Around for Google Forms problem

  4. Google is returning 302 .. you should make another request to the “location” it sends… wget may be working becouse it makes the redirections alone…

    • I agree. The trick is how to get the WordPress API to do it without having to dink with the core code. There appears to be a hook I might be able to use although I have been so busy at work the last couple weeks I haven’t had time to try it out yet.

  5. Now there isn’t the legacy form.
    What can I do with the new form?

    • I am not sure what isn’t formatted correctly. When you say “old forms” versus “new forms”, they are two different forms so it is hard to compare one versus the other. In looking at them they both seem to have the same CSS applied to them.

      What is it in the new form you want to fix, that is probably the best way to approach it.

      • Hi Mike, by new form I mean form made with the new Google Apps Form, old is the legacy form that is not accessible anymore.

        • Google made some CSS changes between the original (aka legacy) version of Forms and the current version. If you set up custom CSS for the original forms there is a chance you’ll have to make some changes to it based on the changes Google made. If you didn’t and it just used the default, then I am not sure why you’re seeing something different.

          The form you have is really long, it would be easier to see the difference, if you create a new form which has the same input elements as the legacy form you’re comparing it to so we can figure out what is different. Otherwise, it may just be easier to set up CSS to fix your new form. What is it on the new form you want to change?

          • I did use the default, that’s why I don’t know it doesn’t look like the original (aka legacy) version.

            I just one the new form to look like the old ones, without all that weird formatting I can’t figure where it comes from. The legacy one I’m comparing with is one I took from your site.

          • Here you can see a side-by-side comparison of the legacy and the new forms with same input elements (plus a text field) and verify css is not being applied: no bold style for questions, “compulsory warning” is shown for every field, every looks more awful…


Leave a Reply