Support

Home Forums Event Espresso Premium Country/State Problem

Country/State Problem

Posted: October 30, 2016 at 6:53 pm

Viewing 21 reply threads


kbayegan@gmail.com

October 30, 2016 at 6:53 pm

On my client’s site, there are several countries. They are getting reports, and they see through registrations, that the country/states are not working properly. Fo example, the state in Canada defaults to Aargau, which belongs to Switzerland. They are getting other similar problems. I cannot replicate this on my computer. Can you think of a reason why this might happen?


kbayegan@gmail.com

October 31, 2016 at 11:44 am

As I am scratching my head today, another user is reporting that she couldn’t choose Indiana at all – kept defaulting back to Alabama. Weird!!


Josh

  • Support Staff

October 31, 2016 at 12:32 pm

The country and state fields work best if the Country field is before the state field. This way when the registrant selects the Country first, the form field for State will show them only the applicable states for their Country selection. Have you tried moving the Country field so it appears first?


kbayegan@gmail.com

October 31, 2016 at 12:55 pm

Yes, of course. My country field i already before the state field.


Josh

  • Support Staff

October 31, 2016 at 1:13 pm

I can’t think of a reason that what you’ve reported here will happen. You can get the Registration User Agent by going to the Transaction records and click on “view additional transaction session details”. This way, you’ll at least know that they tried to register using an out-of-date, unsupported browser.


kbayegan@gmail.com

November 1, 2016 at 6:37 am

I checked. For a bunch of people the State under Canada is defaulting to Aargau, which belongs to Switzerland. It is truly a mystery. Here are some samples of user agents used:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.3 Safari/537.86.7

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17

Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36

Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG SM-T350 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Safari/537.36

And. some of these people have registered in the past without a problem, and now this is happening. I even looked at the database directly, I can’t see any apparent corruption.


kbayegan@gmail.com

November 1, 2016 at 6:47 am

If this turns out to be an unsolvable problem, is there a way to just remove the State field and have users type in their State/Province? I know tis is far from ideal, but might be a workaround.


Josh

  • Support Staff

November 1, 2016 at 6:54 am

What you could do is add an additional text field for State, not as a replacement, but as secondary field in case they need to correct what’s in the the drop down if the drop drown isn’t working for them.


kbayegan@gmail.com

November 4, 2016 at 4:55 pm

Hi again,
This problem is getting worse. The state from many countries are defaulting to Aargau. I have no idea what has gone wrong. Is there any way I can pay for some help and someone at your place can take a look at this?


Josh

  • Support Staff

November 7, 2016 at 7:36 am

May I ask how you suggest we can look at this if there is no known way to reproduce the issue?


kbayegan@gmail.com

November 7, 2016 at 1:53 pm

Hi there,
As a developer myself, I completely understand what you are saying and this is exactly what I have been saying to my client. But, it seems the problem is gradually spreading. Now, I can reproduce it on my iPhone and not on my Mac. My client was receiving reports and problems, but couldn’t reproduce it. Now, they can see it themselves. They tried to help someone who had problems and register them on the phone. When they choose the country as “Canada” and the Province as “Ontario”, the screen insists to default to Alberta, AND when they receive the registration, the Province is not even Alberta and it is Aargau (in Switzerland). I am giving you links to screenshots below.

I know it is not the question of you not believing us, but I am trying to find a way to help my client. I’d appreciate if you could tell me where to look, how to debug this, or whatever. I’d also be happy to make a duplicate staging copy of the site and give you admin access so you can check and see if I have some wrong setting somewhere and I’ll be happy to pay for this service.

I am so happy with your product that I would not even consider using anything else, but I need to have an answer for my client, or a workaround.

Here are links to screenshots:
https://dl.dropboxusercontent.com/u/4461710/ScreenShots/Screen%20Shot%202016-11-07%20at%203.15.29%20PM.png
https://dl.dropboxusercontent.com/u/4461710/ScreenShots/Screen%20Shot%202016-11-07%20at%203.16.07%20PM.png


kbayegan@gmail.com

November 7, 2016 at 1:58 pm

By the way, the first screen shot is the client reproducing the problem after they have chosen Ontario as the Province, and the second is the registration from the client showing Aargau.


Josh

  • Support Staff

November 7, 2016 at 2:53 pm

When they choose the country as “Canada” and the Province as “Ontario”, the screen insists to default to Alberta, AND when they receive the registration, the Province is not even Alberta and it is Aargau (in Switzerland).

May I ask what was the browser version and operating system they were using at that time?

It might also help to clone the live site onto a development site, then disable all other plugins and switch to the default WordPress theme to rule out whether there’s a script that’s conflicting on that site.


kbayegan@gmail.com

November 8, 2016 at 7:00 am

Last client with problem was using:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9

There are many more.

Client started experiencing it yesterday. They used Chrome on Mac 10.11

I can now reproduce it on my iPhone, Safari, IOS 10. Whatever country you choose, when you select the State, it defaults back to the highest alphabetical entry in that list of States and when finishing registration it default back to the highest alphabetical entry in the list of ALL states in all countries, which happens to be Aargau. To reproduce on iPhone: Go to the “Courses” menu -> Current Courses. Select any event, add to cart and proceed to registration. Then you can test the
Country/State. Site: https://academyoftea.org

What’s baffling is that since September, we have not updated or changed anything on the site or the template except EvenEspresso updates, and it was working just fine.

At this point, although it is difficult, if not impossible, my ideal solution would be to find a way to completely disable drop-downs for Country and State/Province and replace them by text boxes where users can type information.

If our attempts are unsuccessful, can we downgrade to the EventExpresso version in which the selection of Stat/Province was not dependent on Country (some time in September)? You could see everything and choose. That was not pretty, but was working fine.


kbayegan@gmail.com

November 8, 2016 at 7:27 am

Hi,
I just noticed that I actually can disable the State/Province field on the Registration form and put a text box instead. That’s just fine with me.

Now, how can I do the same on the Payment form?


Josh

  • Support Staff

November 8, 2016 at 2:45 pm

You can use a filter to actually change the billing form’s state field to be a text field:

https://gist.github.com/joshfeck/d452eb64caf380d6dc72

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


kbayegan@gmail.com

November 8, 2016 at 7:58 pm

May I please have a link to download the EE version you had on September 17th. That’s the last time we know for sure everything worked fine and I want to check that and make sure.


Lorenzo Orlando Caum

  • Support Staff

November 9, 2016 at 7:32 am

Hello,

The release prior to that date would be 4.9.12:

https://eventespresso.com/wiki/ee4-changelog/#4.9.12

Earlier versions of Event Espresso can be found on GitHub:

https://github.com/eventespresso/event-espresso-core/tree/4.9.12.p

I recommend going with Josh’s suggestion and testing this out on a development copy of the site rather than making changes on the live site.


Lorenzo


kbayegan@gmail.com

November 11, 2016 at 6:50 am

Just for your information, I did some tests on a development clone of the site.

Using version 4.9.12 (where state/province is NOT selected according to Country), the site works fine.

Using version 4.9.13 (where state/province IS selected according to Country), the site starts misbehaving as described above.

Since I don’t thin it is advisable to revert to a previous version and never upgrade again, I ahve decided to replace the Stat/Province drop-down on both Registration and Payment pages with text fields. The only remaining problem is that on the Payment page, the State/Province field is filled with a number (see screen shot link below). IS there any way in the filter to at least make it blank, since it can no longer get it from the Registration page?

Screen shot: https://dl.dropboxusercontent.com/u/4461710/Screen%20Shot%202016-11-11%20at%208.39.09%20AM.png

I am also open to any other suggestions.

Thanks.


Lorenzo Orlando Caum

  • Support Staff

November 11, 2016 at 8:01 am

Hi,

Could you try the filter (FHEE__EE_Billing_Attendee_Info_Form__populate_from_attendee) shown here:

https://gist.github.com/lorenzocaum/ea0401828f83826917d4

We would still like to help you determine why a random state/province is being selected as we have not seen other reports.

From the development site, could you move the site into defaults with just a default WordPress theme and only Event Espresso running?

Does the issue continue there?


Lorenzo


kbayegan@gmail.com

November 11, 2016 at 8:23 am

I will try your suggestions.

Just to be clear, the stat/province is not selected randomly, it defaults to the highest alphabetical one when you are filling the form and to the highest alphabetical of ALL states in ALL countries when the registration is saved.

The baffling thing is that it affects some users and not others. The client who was not affected until two weeks ago is not affected. I am affected on my iPhone and not on my Mac. And I have not changed anything on the site recently.


Josh

  • Support Staff

November 11, 2016 at 2:50 pm

I think Lorenzo meant to write that it was randomly happening, not a random state/province. It’s understood that it’s not a random state/province, but actually randomly occurring. It will really help to know whether this occurs on the test site with the default WP theme and no additional plugins installed.

Viewing 21 reply threads

The support post ‘Country/State Problem’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso