Forgive me for possibly being obtuse, but I don't have any states/provinces showing up in my dropdown selection. Are they supposed to? Was there something else I needed to do?

If is ignore that field, and just enter a zip code, the correct state is supplied. If I attempt to use the dropdown, I get "xx" for a state/province, even if I use a zip code.

Comments

astra’s picture

Go to the "main settings" page of location: administer/settings/locatoin

Browser to this part: Enable all available features for locations from the following countries:

Tick those countries whos provinces you want to show in the dropdown list.

Click the "Save configuration" button

Hopefully successful!

jo1ene’s picture

I just double checked and indeed I have done this. I have US and Canada checked off.

seanr’s picture

Category: support » bug

I think the problem here is that the modules settings page shows those boxes as checked by default even though it's not saved in the database. It doesn't get saved until you actually submit that page, so people are pulling up that page, seeing them checked, and thinking they're enabled when in fact they are not. If the boxes are checked, then the module should have them actually be enabled by default and not just appearing that way. Otherwise, the checkboxes should be unchecked by default. Honestly, it makes no sense to force the user to go and save that page just to enable something that would seem standard, though. For that reason, I'm changing this to a bug. Looked into producing a patch for it, but I'm afraid I'm at a loss.

ankur’s picture

Yes, seanr describes the problem. If you want provinces/states for a certain country enabled, you have to check the box even if you have already selected a country as your default country. Someone else had ported location from 4.6 to 4.7 and that's when this bug was introduced (the logic that automatically enables features for the 'default country' is a little bit extra work to implement with the new forms API). For now, I would just advise making sure the 'default country' is also checked in the list of countries for which you want to enable all features. If I get the chance soon, I'll introduce a patch that rectifies this problem unless someone here knows how to use the Forms API and is willing to take it upon themselves in the meantime.

-Anklur

catch’s picture

Status: Active » Closed (duplicate)