1. Go to store/settings/payment/edit/methods and fill in the form for the check reception address.
2. Choose a country with no substates (for example Denmark) and submit the form.
3. Validation will complain that no selection has been made in the state field

I actually did not run into this issue because I needed the check payment option, but it breaks the ability to submit the "Payment methods" form as a whole and make changes to other payment options, even though the check option is disabled. And since the check option is part of the "payment pack", disabling the module is not an option either, if you need the other methods.

For anyone else who might be experiencing the same: The quick and ugly fix is commenting out line 365 in ubercart/payment/uc_payment_pack.module:
//$form['uc_check_mailing_zone'] = uc_zone_select(uc_get_field_name('zone'), variable_get('uc_check_mailing_zone', ''), FALSE, $country_id);

CommentFileSizeAuthor
#6 check_country.patch1.57 KBIsland Usurper

Comments

cha0s’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this. I imported Denmark and submitted the form, got the normal "The configuration options have been saved" message.

Are you sure this element is what was giving you the error?

krasmussen’s picture

It was definitely the state element that gave me the error. Could you try disabling all locales but Denmark?

krasmussen’s picture

Status: Postponed (maintainer needs more info) » Active
rszrama’s picture

Issue tags: -payment, -check, -state +i18n, +ubercamp sprint
Island Usurper’s picture

When Denmark is the only enabled country, it doesn't complain because you didn't choose a state, but rather that your choice is illegal. So, really what needs to happen is for the zone list to be updated based on the country's default value.

The store settings form does it correctly, so a quick copy/paste should work.

Island Usurper’s picture

Status: Active » Fixed
StatusFileSize
new1.57 KB

Actually, it's just a matter of using the site's default country instead of 840 for the default value of the uc_check_mailing_country variable.

Status: Fixed » Closed (fixed)
Issue tags: -i18n, -ubercamp sprint

Automatically closed -- issue fixed for 2 weeks with no activity.