1) Add 1 or more signup-enabled products to the cart, signing up for either a new or existing user
2) Place a credit card order where the gateway rejects the payment, generating the message "We were unable to process your credit card payment. Please verify your details and try again. If the problem persists, contact us to complete your order."
- At this point, uc_signup clears out $_SESSION['uc_signup']
3) Try to submit the order again
4) See
warning: Invalid argument supplied for foreach() in .../uc_signup.module on line 990.
We were unable to process your credit card payment. Please verify your details and try again. If the problem persists, contact us to complete your order.uc_signup.module on line 990.
5) Try to browse to /cart/checkout, get redirected to the attendee information form since $_SESSION['uc_signup'] is now empty.
Note that user profile information is not lost when this happens, only the list of which attendees should be signed up for which products.
This is a regression introduced by #1005352: Signups incorrectly finalized across orders when products from uncompleted orders remain in $_SESSION.
Comments
Comment #1
ezra-g commented"uc_signup.module on line 990." should read "Invalid argument supplied foreach in ...uc_signup.module on line 990."
Comment #2
ezra-g commentedNote, you can reproduce the credit card gateway failure by enabling uc_credit without the test gateway or another gateway enabled.
Comment #3
ezra-g commentedI tested that a fix that alleviates the error in the present issue, as well as #1005352: Signups incorrectly finalized across orders when products from uncompleted orders remain in $_SESSION, based on reproducing the steps at http://drupal.org/node/1005352#comment-4549404 .
Clearing out the UC_Signup session information is redundant here, since we already clear it in uc_signup_mark_paid(). To workaround Ubercart's lack of API consistency with off-site payment methods, there is already #877570: uc_signup info not cleared from $_SESSION with off-site payment..
This fix is committed: http://drupalcode.org/project/uc_signup.git/commit/0914200