Closed (fixed)
Project:
Ubercart Addresses
Version:
5.x-1.0-rc3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Jun 2008 at 21:13 UTC
Updated:
9 Jul 2008 at 03:55 UTC
Hi, in function _uc_addresses_db_add_address is: $aid = db_next_id('uc_addresses'); ... I had problem with creating new addresses and i found problem there... it should by so: $aid = db_next_id('{uc_addresses}_aid'); by http://api.drupal.org/api/function/db_next_id/5 ... now it works fine for me ... (it works fine in general maybe, but i have done some special data transfers -> creating of users address books through theirs addresses in uc_orders table and so start happend some collisions probably (sorry for my english))
Comments
Comment #1
Miteto commentedI believe this is the "culprit" for me - since I don't use the billing address pane (it's hidden) and when i review the order then I press back button, the last used address gets duplicated. After I changed $aid = db_next_id('uc_addresses'); to $aid = db_next_id('{uc_addresses}_aid'); I get a warning for "Duplicate entry ..." but no duplication of addresses.
Comment #2
freixas commentedHey, guys, thanks for reporting this! The error was due to my lack of familiarity with some of the subtler points of Drupal.
Unfortunately, if I make this change, it will screw up any existing installations. I need to review how to do a database update: I have to copy the old sequence number to the new sequence number. It'll take me a little bit of time to figure out the right syntax and test it, so I'll be a bit delayed.
For most people, this shouldn't affect anything. As far as I can tell, all Drupal cares about is that the name identifying the sequence is unique.
As for error with "Duplicate entry...", that was a bug fixed a while back. You may want to update to RC3.
Comment #3
freixas commentedOK, I fixed this. Hopefully, the database update will run properly - it seemed to work for me. It should delete the old sequence number, but copy the value to the new sequence number.
The fix is in RC4, just released.
Comment #4
freixas commentedComment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.