I am using Signup Integration for Ubercart 6.x-1.x-dev, Signup 6.x-1.0-rc6, Ubercart 6.x-2.2 and Drupal 6.16. Everything seemed to be working extremely well, and then about a week ago the client noticed that whenever they received an order for a signup from Ubercart, the purchaser may or may not show up on the signup tab for that node (It seems to work about 60% of the time).

I was originally using beta4 of uc_signup, but I upgraded to the dev version to see if that fixed the problem. I have looked at everything I can think of, all the way to removing all three of the above module, uninstalling them from the Module Uninstall tab, and then reinstalling and re-enabling them. But I can't seem to solve the problem.

Any help would be appreciated. If you need more information, let me know and I will gladly get it to you!

Thanks,

Jeremiah

Comments

ezra-g’s picture

Status: Active » Postponed (maintainer needs more info)

"the purchaser may or may not show up on the signup tab for that node (It seems to work about 60% of the time)."

Finding the problem here will probably involve isolating the change that makes things work sometimes but not others.

What payment method(s) are you using? You might see if there's a connection between payment method and signups created.

Another thing to check is whether there are any items in uc_signup_log that are temporary (type = 0).

otisjs01’s picture

OK...I tested out the individual payment methods. COD and Check both process properly, and the user shows up as an attendee. But, whenever the payment type is Credit Card, the user does not show up as an attendee.

I also check the uc_signup_log table in the database, and the type on everything is set to 0. And everything that is set to 0 is showing up correctly in the node. But what's really odd: Any order where the payment type is Credit Card doesn't even show up in the uc_signup_log table!

Any ideas?

Thanks!

Jeremiah

otisjs01’s picture

OK...upon further research, I've discovered that uc_signups cancels signups if the order balance is > 0.00. I am running the credit card payments through the Linkpoint API, and the transactions are set to authorize and capture immediately. I've also got the transaction type set to SALE. The credit card processing is working correctly. The proper totals are being charged to the credit cards, and the transactions are being returned to uc as paid.

But, for some reason, uc_signups is not seeing it. Is there somewhere specific I should look, or a setting I might be overlooking somewhere?

Jeremiah

les lim’s picture

Assigned: Unassigned » les lim
Category: support » bug
Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new492 bytes

I just came across this same issue. The problem is with the uc_signup_mark_paid CA predicate and function order in modules implementing hook_order at the "submit" stage, including uc_signup. uc_signup_order assumes it runs at submit time before payment modules attempt to process the order, but since they run at the same time and have the same default weight, it's a crapshoot which one goes first. If the payment module goes first and successfully accepts payment, it runs the CA predicate, which then unsets the signup information before uc_signup_order gets a chance to add the signups and create new users.

The real issue here is that hook_order needs a presave stage. Lacking that, here's a patch putting an update hook in uc_signup.install that sets the module weight to -1. That hopefully won't be too controversial.

This was largely crippling the module, so marking this critical.

ezra-g’s picture

Thanks very much for the debugging you've done here.

I'd like to do (and have others do) some testing of this patch before we commit it, and consider how the change in weight could affect the relationship between uc_signup and signup.module.

I hope to test soon. Thanks!

les lim’s picture

Whoops, looks like someone else (Mattamatic) figured it out a couple months ago in a different thread: #722954: Invalid argument foreach(), line 595 and 630

ezra-g’s picture

Interesting. At least one user reported that changing uc_signup's weight to -1 didn't resolve the issue, however that's not definitive either way ;).

les lim’s picture

Yeah, I saw that in the other thread, but wasn't sure what to make of it. It sort of looks like she got it figured out.

I'll be trying out the patched version for a site-in-progress, so I'll be on the lookout for problems.

otisjs01’s picture

Wow! Thanks for the debugging @lesmana!

For the record, jumping into the database and changing the weight of uc_signups to -1 in the system table did seem to fix the problem. I'm using that as a temporary workaround until I see an official patch or update. And, if I notice any odd behavior since this change, I will definitely let you know.

Jeremiah

Jake2003’s picture

Is there any negative effects of using PayPal website payments standard in the 'Sandbox' environment in relation to signups not displaying in the uc_signup. (I have currently set the weight to -1 for the uc_signup in the system table.)

If I choose to pay with check or COD then the signup gets captured properly.

Thank you

les lim’s picture

ezra-g: Instead of changing the module weights, what about re-implementing the current code in uc_signup_order() as an additional submit callback for uc_cart_checkout_review_form()? We could easily accomplish that with form_alters, and it would give us some control over when the code executes without the uncertainty of messing around with weights.

ezra-g’s picture

That's a good idea but wouldn't work for payment methods that send the user off-site, like paypal wps.

otisjs01’s picture

It turns out that changing the module weights seems to have created another problem!

The client has seen several signups in the signup list, but the credit card for those signups was declined when the actual order was placed.

Any ideas on how to address this? I can provide any information you need, just let me know what you are looking for.

Thanks,

Jeremiah

ezra-g’s picture

Status: Needs review » Fixed

This is committed. Thanks, @lesmana for the troubleshooting and patch, and I apologize for the delay in reviewing/committing!

@otisjs01, I'm not sure that the problem you are describing is specific to the module weight and in fact I've seen it happen before this patch was applied. Please see #839640: Provide Better signup locking for more on addressing that problem.

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jeffam’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta5
Status: Closed (fixed) » Needs work
StatusFileSize
new330 bytes

One little glitch: the module weight is not set to -1 when installing the module from scratch. (At least it didn't in my case, and I'm on beta5 which includes update 6000.)

Can the update to the {system} table happen during an install hook? I've attached a patch to show what I mean, and I'll test later, but if anyone knows the right way to do this, then please disregard my patch.

Jeff

jeffam’s picture

Status: Needs work » Needs review
StatusFileSize
new328 bytes

According to this page: http://drupal.org/node/110238, the call to set the module's weight can be made during hook_install(), and should look like this patch.

Jeff

ezra-g’s picture

Title: UC_Signup orders are completing, but signups are not showing up in the node » Signups not created - UC_Signup weight should be -1 with some payment methods
Status: Needs review » Fixed

Looks good and works in my testing.

Thanks for the patch!

Committed: http://drupal.org/cvs?commit=422312

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.