Closed (duplicate)
Project:
Signup Integration for Ubercart
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2010 at 11:22 UTC
Updated:
26 May 2010 at 01:43 UTC
My users are paying for their classes and their orders are marked as complete, but they are not actually ending up in the signup list. I see these two errors in the log for every failed checkout/signup:
Invalid argument supplied for foreach() in /public_html/sites/all/modules/uc_signup/uc_signup.module on line 595.
Invalid argument supplied for foreach() in /public_html/sites/all/modules/uc_signup/uc_signup.module on line 630.
The first one is related to $_SESSION (and I gather that the second is because of the first), but beyond that level of investigation I am lost. Any ideas?
Thanks!
Comments
Comment #1
walden commentedI was getting the same error messages, but after adding TWO REQUIRED profile fields it works smoothly. However this is not ideal as the two fields won't always be necessary.
@leenwebb did you find a fix?
Comment #2
leenwebb commentedNope, I'm still having this issue.
Can you give me a little more info about how/where to add required profile fields? That actually might be a decent workaround for me.
Comment #3
walden commented1. Enable the profile module
2. Go to /admin/user/profile and create two fields which are required and show on the user registration form
Comment #4
leenwebb commentedOh so you mean the trick is TWO? I already have one required profile field, so you're saying I have to add another? That is mighty weird, but worth a try!
Comment #5
walden commentedYes, two. Mighty weird, I concur! Hence my original post.
Comment #6
leenwebb commentedHmmm, that didn't work for me. Of course I made 3 required fields (first name, last name, phone) so maybe I screwed myself with that. I guess I will un-require phone and see if I make any headway.
Do you have the "Signup Confirm Email" module enabled? I don't (because I don't want it), and am wondering if that could be related?
Comment #7
leenwebb commentedUpdate: Nope, having two required profile fields does not work for me. I am still seeing this error with every single signup.
Comment #8
walden commented@leenweb I only have signup and signup integration for Ubercart enabled.
Comment #9
ezra-g commentedDoes this happen with the latest dev version?
Comment #10
leenwebb commentedI am using:
Signup 6.x-1.0-rc6
Signup integration for Ubercart 6.x-1.x-dev (Feb 10 2010)
Comment #11
Mattamatic commentedI can confirm I am having the same problem on the latest release. It appears that $_SESSION['uc_signup'] is disappearing somewhere between the order confirm page, and uc_signup_order. All other session variables seem to be present. Happens with both authenticated and anonymous users.
Comment #12
Mattamatic commentedProblem seem to be that uc_signup_mark_paid is being called before uc_signup_order, still investigating.
Comment #13
ezra-g commentedThanks @Mattamatic and everyone who has confirmed this. I think this may have to do with the anonymous user having an account created as part of the regular Ubercart checkout process. I hope to look into this son, but patches welcome in the meantime ;).
Comment #14
leenwebb commentedOh, interesting ezra-g, I think you are right -- looking back through my logs I see that every error is preceded by a new user creation and login (that also explains why I was NEVER able to reproduce using my own already-existing test accounts).
Comment #15
Mattamatic commentedJust out of curiosity, it there a reason why the "Change temporary signups" action is being called from the "A payment gets entered for an order" trigger? I've only looked at it briefly, but tt appears to me that this trigger gets called before the hook_order submit operation.
Comment #16
ezra-g commentedIn what situation would a payment getting entered for an order happen before the order was submitted by the user?
Comment #17
Mattamatic commentedWell payment gateways (ex. uc_credit.module) implement payment processing using the hook_order submit operation as well. And I am guessing it is the uc_payment_process function which sets off the "A payment gets entered for an order" trigger. So if the payment gateway module weight is higher than the uc_signup module weight, it's hook_order will get called first, setting off the trigger, and nuking the $_SESSION['uc_signup'].
Update:
Confirmed that this is the problem. Quick-fix is to have uc_signup install with a weight of -1, long term move uc_signup_mark_paid logic. I am fairly new to Drupal or else I would patch it myself :)
Comment #18
leenwebb commentedConfirmed that this is the problem. Quick-fix is to have uc_signup install with a weight of -1, long term move uc_signup_mark_paid logic.
So does that mean that I could change the weight of uc_signup in the system table to -1 to get the same effect?
UPDATE: I changed the weight of uc_signup to -1 in the system table and am still having this issue with every single signup.
Comment #19
Mattamatic commentedWhat is the weight of your payment gateway module(s) set to?
Comment #20
leenwebb commentedEvery other uc_ module is at 0. Payment gateway is PayPal Standard (the kind that takes the user to PayPal to complete the transaction), though the error is happening before the payment ever takes place. At least, the logs show that the PHP errors occur, then a few minutes later I get the IPN notification from PayPal.
Comment #21
leenwebb commentedWoo hoo! Turns out this was tied in with another issue I was investigating and was solved by http://drupal.org/node/540298#comment-2818976 . (The checkout pane in question was sort of redundant, so I had hidden it. But show it and VOILA! It all works.)
Comment #22
faite commentedUsing the latest Dev build of Uber and of UC_Signup I get the same invalid.
Invalid argument supplied for foreach() in /httpdocs/sites/all/modules/uc_signup/uc_signup.module on line 662.
Invalid argument supplied for foreach() in /httpdocs/sites/all/modules/uc_signup/uc_signup.module on line 618.
The signups do not get added to the signup list, but they do seem to get added somewhere to the DB as you can't attempt to reregister using the same email.
This doesnt occur in the current stable version of UC
Comment #23
les limMattamatic is entirely correct in #17 - I just posted an explanation and patch without realizing someone had already figured it.
#808790: Signups not created - UC_Signup weight should be -1 with some payment methods