| Project: | Ubercart Contributions |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
New User Checkout is not functioning with CAs that allow a role to be immediately granted. I flipped through lots of issues on this, but they were all pertaining to UC 1.x
I run a site that offers subscriptions and other items for sale. Ubercart has been fantastic so far, thank you very much.
I want users to immediately receive their premium role upon purchase of a subscription, so I set a conditional action that would move the order from Payment Received to Completed if the weight of the item is 0. I also experimented with setting the role to be applied upon Payment Received rather than Order Completed.
When an anonymous user creates an account at checkout and these actions are set I get the following error in my log:
Duplicate entry '' for key 2 query: INSERT INTO sslab_users (created) VALUES (1254156607) in /home/sporbcom/public_html/modules/user/user.module on line 327.
In this case, Ubercart will report Customer granted user role Elite Member on the order page, but the user will not actually be granted the role. I suspect that the workflow is a little out of order, and UC tries to grant the role to an account that doesn't exist yet?
This has forced me to turn off the automatic subscription start until I find another way to do it...certainly not optimal. Is this a bug? is there another workaround I haven't encountered or considered?
Thank you for the support-
