Closed (fixed)
Project:
Ubercart Addresses
Version:
5.x-1.0-rc3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
23 Jun 2008 at 19:29 UTC
Updated:
9 Jul 2008 at 03:42 UTC
After disabling the country field in store/settings/checkout/edit/fields when I hit the "Review Order" button the selected address gets duplicated.
Ubercart version 5.x-1.0, billing address fields disabled too.
Comments
Comment #1
freixas commentedHi,
Could you please provide more a more step-by-step sequence? Are you saying you get two copies of an address after hitting Review Order once? Are these exactly the same?
Ubercart has an interesting architecture in that, when you hit Review Order, the order actually gets stored. If you go back and change things and hit Review Order again, it stores the order again. This is the only hook I know about into the order process. The uc_addresses code should silently throw away exact duplicates (the silent part occurs in RC2 and later).
Comment #2
Miteto commentedHere we go:
Yesterday I did a clean install just to be sure if I don't mess things up. I'm a bulgarian so I imported bulgaria.cif to store. Changed the default measurement units according to european standards. Then I entered two addresses in my profile so I can check if shipping quotes' rules and that annoying duplication of the addresses. At first everything went OK but after I disabled the country field things got messy. If i leave the country field enabled but not required - everything's fine. I started to wonder if this is a inherited Ubercart bug.
One more thing - if I disable the postal code field the shipping quotes' rules are not calculated automatically.
Comment #3
freixas commentedHI,
All I got from that was that you disabled the country field and things got "messy". In what way were they messy? What did you do to get to the "mess". Did you see a problem the first time or only the second time? Did you use the Review Order button and then go back to the checkout form?
I can try to see if I can reproduce this when I have a chance. If you could provide me with a set of steps to reproduce the problem, you might get a fix faster. Here's a start:
Is this enough to produce the error? In other words, if I proceed to My Account / Addresses, will I see duplicates or is there more I have to do?
Comment #4
Miteto commentedI guess I've been unclear - when the country field is disabled and I add a product to the cart then I press the "Review Order" button and the address I chose on the previous screen gets duplicated - I don't even Submit the order. I'll post screen shots if I alone stumble upon this issue.
Comment #5
freixas commentedHi,
You win the cigar! I was able to duplicate the problem and it was caused by the way SQL handles comparisons with NULL as well as the fact that duplicates were being searched for before the default country code was substituted for the missing code. Both of these could cause the check for duplicates to fail.
I also found another bug while testing yours, so you get a double bonus!
Thanks for reporting this. Fixed in RC4 which should be available shortly.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.