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);
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | check_country.patch | 1.57 KB | Island Usurper |
Comments
Comment #1
cha0s commentedI 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?
Comment #2
krasmussen commentedIt was definitely the state element that gave me the error. Could you try disabling all locales but Denmark?
Comment #3
krasmussen commentedComment #4
rszrama commentedComment #5
Island Usurper commentedWhen 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.
Comment #6
Island Usurper commentedActually, 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.