Roles are currently not being assigned on checkout to new customers. I tried changing the conditions order status to completed and Complete non-shippable order after payment received but this didn't change anything, then tested the role expiration date.

If you're using the global expiration settings then the role is assigned after the customer completes the checkout (with default conditional actions) but as soon as you override the default ending expiration date the action fails with no errors in the logs.

Using MySQl 5.1, PHP 5.3.2, Drupal 6.22, Ubercart 6.x-2.7. This was a fresh install without an upgrade of Drupal or Ubercart.

Thanks

Comments

longwave’s picture

Priority: Critical » Normal
Drupal Centric’s picture

Any potential fix for this? Thanks.

sk33lz’s picture

I ran into a similar issue on a client site this week. It seems that for some reason the default Conditional Action for "Grant or Renew purchased roles" only triggers on renewals now by default due to the 2 Arguments available under Order: of "Original Order" and "Updated Order". Updated Order is chosen by default in both the Condition and the Action. I don't know if there was only 1 Argument available as just "Order" before, but I have just added a custom predicate to do the same for the "Original Order" in both the Condition and the Action hoping it will fix the issue for my client. I will report back my results.

Longwave, when I was researching my issue I found this issue also, http://drupal.org/node/1281140, which seems to be caused by the same issue of the default Conditional Action for "Grant or Renew purchased roles" only being set for renewals by default. I did not want to re-open that issue, but wanted to point out that it seemed related to my findings.

sk33lz’s picture

Well, that did not work either. Roles just aren't being assigned anymore at all. The comment in the order log is just blank, but seems to be the message that used to say that the Role was granted. Not sure what the deal is...

TR’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

If this functionality has stopped working on your site I'm not sure how we can help you - you're going to have to do some debugging on your end to figure out what's going wrong. I suggest you start by resetting your conditional actions.

TR’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

You can reopen the issue if you can provide steps to reproduce the error.

danwonac’s picture

Of slight relevance to this, role expiration was failing for me because I was setting the expiration date past 19 Jan 2038 (strtotime errors on 32bit php). Doh.
Customer got very upset as they purchased life membership and got their 1-month expiry notice immediately.

ScottBaetz’s picture

For those of you who are struggling with the following situation, I have the answer.

Situation - You have a user who exists on your web site. Perhaps you had been debugging or performing setup for this feature, you DELETED a role directly from the user, but you have NOT DELETED the corresponding expiration date. You are testing, so you purchase the role for the user - and expect the role to be assigned. It doesn't get assigned. Then you spend HOURS trying to figure out why.

What's wrong? - Nothing, you (and myself as well) didn't clean up as much as we needed to.

Why?When a user has an existing expiration date for a role, but is NOT assigned the role, they NEVER will be assigned the role. UC_ROLES Conditional Action for role assignment and renewal will NOT assign a role when an existing expiration date exists.

Solution: Make sure that expiration dates are deleted as well as roles.