Why are my buttons in Chinese?

Periodically I get a question from someone using WordPress Google Form asking why their buttons (and some other text) is in Chinese (or some other language but Chinese is the most common)?

If you haven’t run into this problem, consider yourself lucky!  The problem manifests itself similar to the images below.

GForm_SS_35 GForm_SS_36

As near as I can tell, this problem happens when the Web server that is running WordPress Google Form is geographically located in a part of the world where Google thinks it should serve up a particular language.

So how do you fix it?  In the previous version of Google Forms, the solution was simple:  Add &hl=en to your form URL and Google would deliver the content in the specificed language (in the case English) – refer to to this post for more details.  Unfortunately the new version of Google Forms doesn’t support this language parameter so I have been at a loss to help people who find themselves in this situation.

For several days I have been trying to find a solution.  Adding cookies to the wp_remote_get() request, .htaccess entries, PHP locale settings, etc.  Nothing made a difference.

While at the gym this morning it dawned on me that there isn’t any reason why I couldn’t “fix” the problem by processing the HTML that Google generates with jQuery.  So that is what I have done.

GForm_SS_37

 

I have renamed the Debug tab to Advanced Options and added the ability to define the text that will appear on the Submit, Back, and Continue buttons as well as the text which indicates fields are Required.

WordPress Google Form v0.46-beta-13 available

This afternoon I uploaded WordPress Google Form v0.46-beta-13.  Yes, this is the 13th beta release of WordPress Google Form v0.46.  Why so many?  Mostly because made a significant change to Google Forms at about the same time I was introducing a major change to WordPress Google Forms.

This release adds a new feature – the ability to log form submissions.  This is something I’ve wanted to do for a while.  The next update will include some settings to control the log (on, off, entries per page, etc.)  but in this beta release, it is on and shows 10 entries per page.  There is a known bug in the pagination of the log file.  The URL to move between pages is wrong and I haven’t been able to determine how to add the CPT and page information which the URL requires to be valid.

Most importantly, this beta release addresses a major bug with multi-page Google Forms AND Google Forms with checkboxes that are created with the new version of Google Forms.  This functionality needs testing so please put it through its paces.

Google Forms Beta (460 downloads)

New Google Forms break multi-page support

Ugh. Google has made the process of using multi-page forms much harder than it used to be. In the older version of Google Forms the values were passed from one page to another in an array.

In the new version of Google Forms the data is still passed from page to page in a variable (called draftResponses) however PHP sees this data as a string instead of an array so the code which reformats the array from a PHP style (which WordPress uses) to a Python style (which Google uses) doesn’t run.

It looks like I will need to parse the string into a PHP array and then encode the array to be compatible with Python. As I said, ugh.

WordPress Google Form v0.46 beta 12 available

I have posted wpGForm v0.46-beta-12 this morning.  This update removes some debug code,  updates the ReadMe file to reflect usage of the Custom Post Type and new wpgform shortcode, and adds the URL (permalink) of the page from which the form was submitted to the confirmation email (when used).

Now that the issues with the new version of Google Forms appear to be worked out, I am close to releasing this update.  All I have left to do is to update my Help and Support Form to support the new usage model (CPT) and I think I am ready.

Google Forms Beta (460 downloads)

WordPress Google Form v0.46 beta 11 available

Things are finally settling down and I am able to spend some time on my WordPress plugins.  I updated Email-Users this week and am now focusing on WordPress Google Form.

Shortly before I went out on vacation I learned from one of the people who has been testing beta releases that the CAPTCHA functionality was no longer working.  I took a quick look at it and sure enough, somewhere between Beta 5 and Beta 10 I broke something and the CAPTCHA was not working but oddly enough, it was only broken on some browsers (e.g. Chrome) but worked on others  (e.g. Firefox).  These sort of bugs are a pain to chase down and with work being very busy and my family and I getting ready to go on a week long trip to Ireland, I decided to wait until I came back to figure out what was wrong.

It turns out I had introduced a very subtle syntax error in the jQuery script which defines which form fields are validated.  I am still surprised it works in Firefox but not in Chrome.  Regardless, it is fixed in Beta 11.

This bug affected me quite a bit as I have the beta version running on my site for Help and Support Requests and I had a slew of spam responses while I was out on vacation.  Hopefully in my clean up I didn’t delete any real requests!

There are a lot of new features in v0.46, please refer to this post from about a month ago which shows how to request an email address from a user as part of the submission.  This post explains how the new Google Form Custom Post Type (CPT) works.

Google Forms Beta (460 downloads)

Email-Users 4.4.4 released

This morning I released an update to Email-Users (4.4.4). This update fixes problems with the meta filter functionality preventing sending email to specific users and an odd situation which could result in duplicate email to some users. You can find the update in the WordPress plugin repository or via an update on your WordPress Dashboard.

I made a mistake tagging the release so WordPress would recognize it which is why the version number jumped from 4.4.2 to 4.4.4.

Emai-Users v4.4.3-beta 1 now available

I have posted a beta release of Email-Users v4.4.3 for testing purposes. This build addresses a problem with using the new Meta Filter functionality with a set of users and also fixes a situation which can result in duplicate emails when Notifications (Page or Post) are sent by selecting both Roles and Users.

Email Users Beta (234 downloads)

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 (460 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.