I am adding a product. Under Default product pickup address. I set my country to Canada. It changes the State/Province drop-down menu to have Canadian provinces. I choose Saskatchewan. I select Save.
I get a red bar at the top of the screen that says: "An illegal choice has been detected. Please contact the site administrator." The State/Province drop-down menu is outlined in red, and only US States are showing up now even though the Country still says Canada.
If I try to change the country to United States and then back to Canada again, the State/Province drop-down menu no longer changes.
Setting a Default Product Pickup Address in the US works fine.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | address_ahah_2.ahah_helper.2.x.patch | 3.21 KB | cha0s |
| #2 | address_ahah.patch | 3.5 KB | Island Usurper |
Comments
Comment #1
rszrama commentedComment #2
Island Usurper commentedOK, I think the thing to do is to use the AHAH framework like it's supposed to be used, so here's a patch that makes it happen on the product edit form. This breaks the old functionality on every other address form, so it's not completely ready yet.
I'd like to be able to make attaching the AHAH behavior generic enough so that it can be put on all of the other forms with minimal fuss. Ideas welcome.
Comment #3
cha0s commentedThis patch doesn't apply anymore, can we get a reroll?
Comment #4
cha0s commentedSo... I've been struggling to make this work correctly, but it's a quagmire.
1) Massive callback duplication
2) Using a module like http://drupal.org/project/ahah_helper
Now sure, *technically* we could roll our own generic AHAH attachment stuff. The question though, is it worth the effort? I tried, and it is not trivial. The forms are simply not unified enough.
However, I have to personally recommend the ahah_helper module. It's also used on mollom.org, so this isn't some POS we're talking about :). However, I did find a bug, which I've reported at #415560: ['#ahah_helper']['#file'] is non-existent!. Besides that, it's a very clean, sane way of doing AHAH, and if we're serious about this, we should consider leveraging it.
P.S. I attached a patch of what code using it would look like.
Comment #5
cha0s commentedAfter chatting with Ryan, we're going to postpone this until the next version of Ubercart, as it will represent a bunch of changes, not to mention another dependency. ;)
Native AHAH in Drupal 6 is pretty painful, unfortunately.
Comment #6
Island Usurper commentedBecause it's not really Canada's fault. ;)
Comment #7
tr commentedLet's see if this can be addressed in the D7 branch.
Comment #8
ludp commentedStill the same behavior: showing the correct states/provinces for the country selection, but upon "Review Order": Illegal choice has been detected and now only US states can be selected.
Comment #9
tr commentedYes, I'm aware of that - that's why I reopened the issue ...
Comment #10
particlegirl commentedsubscribe
Comment #11
particlegirl commentedJust letting you know i am getting this problem on a fresh install of d7 and uc 3, everything else is working so well. I really need to have all countries as an option. I'm only getting this problem on 'review order'. All the states are present for entering in the information, its only after i've click 'review order' that it all falls apart. Thank you so much for any assistance here..
Comment #12
longwaveThis is being dealt with in #1071332: State/Province select boxes need converting to Ajax
Comment #13
particlegirl commentedthank you very much, sorry I had actually missed that.