uid => 0 on some orders

Posts: 47
Joined: 08/08/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Not Kulvik

On our latest store, using code form the Bazaar, we have discovered a small problem with some orders - like one out of 200 - which is processed and paid for but still has uid set to 0.
I haven't been able to reproduce this myself, but it's happening from time to time. It seems to be a combination of anonymouse chekcout and custom payment module, but looking at the code and the data in the database, I just can't see where the problem should be.

The latest order with this problem was created with timestamp 1216010638 with user created at 1216011250.
Order primary_email is correct and therefore the code in uc_cart_complete_sale() should have either picked up the right uid or created a user and then updated the order with the right uid. But uid is still 0.
Because of this I can't really see where our custom payment module could interfere either... As long as uc_cart_complete_sale() is called and the order has a primary_email, order->uid should be updated and not remain 0.
Has anyone else experienced anything like this? I'm a bit unsure about where to look so any tips will be greatly appreciated.

Edited:
Because I write english like a norwgian =/

--

Erlend Strømsvik
Ny Media AS
erlend@nymedia.no

Posts: 31
Joined: 02/10/2008

+1 we have seen this a couple of times in the past month or so. Using 1.0 code with PayPal WPP.

--

www.PrintersCloset.com - Epson professional graphics printers and supplies for photographers, fine art galleries, sign printers and commercial printing companies.

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Oh! Maybe I've seen this, too... I was working on a test site and if I checked out anonymously using the e-mail address of an existing account, I'd get the existing user checkout message but the order would never get attached to my account. In the test site, I updated uc_cart.module to the latest Bzr version and the problem went away. I'm not sure if this is a fix for everyone, but it's worth a shot. You might try to duplicate the problem as I described first.