Customers receive the following error "We're sorry. An error occured while processing your order that prevents us from completing it at this time. Please contact us and we will resolve the issue as soon as possible". However, the order is successfully processed and set to payment received. I believe it happens on products with conditional actions.

Comments

cafuego’s picture

Version: 6.x-1.0-beta4 » 6.x-1.x-dev

I kept hitting this too, on a site with COD and PayPal enabled. Using Free Order instead of COD made no difference, so I sadly had to kill a kitten to get free orders through the checkout.

The problem occurs between uc_cart_checkout_review_form() and uc_cart_checkout_review_form_submit().

When the review form is first displayed, $_SESSION['cart_order'] is set, but after you click submit, it's gone.

I've worked around the problem by adding a new session var that keeps a copy of the order_id and put it back in uc_cart_checkout_review_form_submit() if it gets unset.

--- a/sites/all/modules/contrib/ubercart/uc_cart/uc_cart.pages.inc
+++ b/sites/all/modules/contrib/ubercart/uc_cart/uc_cart.pages.inc
@@ -470,6 +471,14 @@ function uc_cart_checkout_review_form() {
     '#value' => t('Submit order'),
   );
 
+// HACK
+if (!empty($_SESSION['cart_order'])) {
+  $_SESSION['_order_id'] = $_SESSION['cart_order'];
+}
+else {
+  $_SESSION['cart_order'] = $_SESSION['_order_id'];
+}
+
   return $form;
 }
 
@@ -489,6 +498,10 @@ function uc_cart_checkout_review_form_back($form, &$form_state) {
  * @see uc_cart_checkout_review_form()
  */
 function uc_cart_checkout_review_form_submit($form, &$form_state) {
+// HACK
+if (!empty($_SESSION['_order_id'])) {
+  $_SESSION['cart_order'] = $_SESSION['_order_id'];
+}
   // Invoke hook_order($op = 'submit') to test to make sure the order can
   // be completed... used for auto payment in uc_credit.module.
   $order = uc_order_load($_SESSION['cart_order']);

I think it's definitely an UC problem and not a UC Free Order problem, though.

naddl’s picture

Issue summary: View changes

Had the same problem in my Drupal 6 / Ubercart 2 installation and it helped me a lot.
But now I had upgraded the Shop to Drupal 7 and Ubercart 3, still running on my localhost.
After having all done I tested the shop: The same error occurs again.
My Problem is, that I am not a programmer and so I can not "translate" this hack from Ubercart 2 to Ubercart 3.
I'm kind of desperate while working on this in my limits for weeks.
So maybe anyone could help me, please?
Thanks in advance!
naddl

naddl’s picture

Today I found the reason for my problem. Hope it helps maybe somebody.
I've installed the module "Add to head" and I added some code to the head of every page like the following:

After eliminating the entire profile, the ordering process works as fine as it should.
It also works after excludig the profile from the paths "cart/checkout/review" and "cart/checkout"