25 replies [Last post]
snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
Was this information Helpful?

Version is Übercart 1.3. I get this error message when I checkout: "We're sorry. An error occurred 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."

The log says: "An empty order made it to checkout! Cart order ID: " .. there is no ID..

Any ideas? Thanks.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: can't complete checkout - error message

Ahh, great. This was to prevent uc_cart_complete_sale() getting called on empty orders. Can you please pass on the steps to repeat the error?

snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
to repeat?

Hi Ryan, thanks for taking time. I run an update from 1.0 to 1.3. I put one of my t-shirts into the basket went to checkout and select bank transfer for payment and confirmed the order... then I got the error. I updated from 1.0 to 1.3 now 2 times to make sure that's not me.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: to repeat?

Are you using a specific bank transfer module for this?

snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
got me

I guess yes.. not a core module. Haven't thought about that. I will get to the modules developer perhaps he is in the upgrade process. How about brining that tiny module into core?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: got me

I can test it out... although I'm not sure why a payment method would screw up checkout like that. Can you complete checkout fine with another payment method?

snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
Re: Re: got me

it's working fine with Paypal. Checked wiht sandbox. I have posted at the Bank deposit payment method module. http://www.ubercart.org/contrib/2516#comment-22685

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: got me

Hmm... maybe enable the payment method pack module and test it out w/ check/money order payment method. I just tried the bank transfer method on the Livetest and it worked fine. Puzzled

naturesimple's picture
Offline
Joined: 04/20/2008
Juice: 27
Re: Re: Re: Re: got me

I'm having the same problem after upgrading to 1.3, using the check/money order payment method.

snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
Re: Re: Re: Re: Re: got me

ok, what I did so far... deleted the entire ubercart directory and installed the 1.3 clean. Run the udpate script. Installed workflog ng 2.x ... activated the payment method pack and selected check and cod, with both the error occured. With paypal sandbox it is working.

I also checked for additional workflow rules which could mess it up, but thers nothing in it. The log still says "An empty order made it ..."

Checked payment method pack "other" which isn't working ...

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Re: Re: got me

Honestly... I don't have any clue why one payment method would cause this bug over another... I've enabled both COD and Check on the Livetest and can check out just fine. Can you reproduce the bugs there by any chance?

If not, it's gotta be a session issue... I can't remember, are you using SSL on the site?

snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
Re: Re: Re: Re: Re: Re: Re: got me

cleaned session, no SSL, reproduction is easy: just ad something to the cart and went to checkout , bingo: Back to the cart page with the error message. As soon as I downgrade to 1.0 everthings fine. Could be reproduced in any browser. With anonymous and loged in.

By chance .. has something changed that needs a specific server configuration, an apache module activated, since 1.0?
Could send module list via pm

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Re: Re: Re: Re: got me

Can you reproduce the error on the Livetest by any chance?

snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
Re: Re: Re: Re: Re: Re: Re: Re: Re: got me

no, I can't reproduce it on the livesite. I did some more testing on my local installation. I went back to 1.2 where the same error is produced. Then I downgraded to 1.1 and there it is different: 1.1 sent me back from the order review to the checkout. Again with 1.0 it is working. I'm wondering what was changed between 1.0 and 1.1 that makes it impossible to checkout... Are there higher demands on the hoster, like modules, configurations, php, mysql, or is a new modul need additionally, or a newer jQuery version? It should be somthing very simple...

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: got me

No, the main thing that was changed is the way we track the HTTP referer... we started to store a value locally if the customer's browser had it turned off. This could be affected by your browser settings or possibly your web server settings... if you were losing session data somewhere, that might affect things, too. Puzzled

I used a block in the content area w/ the following code in it to track my referer info and my session data while testing the feature:

<?php
print '<pre>Session: '. print_r($_SESSION, TRUE) .'</pre>';
print
'<pre>Referer: '. uc_referer_uri() .'</pre>';
?>

If it can't ever find a referer, then it might be kicking you back a few screens... but I thought there was a failsafe on it to pass through. Maybe post what this turns up at each stage in your checkout.

snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: got me

thx. I put the block online and I got the following output
in the Review Screen:
Referer: http://www.mysite.de/cart/checkout

back in the Cart:
Referer: http://www.mysite.de/cart/checkout/review

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: got me

Nothing showing up in the session?

snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: got me
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: got me

It seems almost like something is clearing the cart_order value a little early... I don't suppose you've got extra content on the page in blocks or elsewhere that queries /cart do you?

dave_the_brave's picture
Offline
Joined: 08/07/2008
Juice: 79
Same problem

I'm having the same issue. I went digging last night and found that the $_SESSION['cart_order'] value is getting smoked somewhere between function uc_cart_checkout_review and function uc_cart_checkout_review_form_submit, so there is something that is hooking into the form and unsetting $_SESSION['cart_order'].

What's interesting is that I put in a little workaround that seems to work pretty well barring any unforeseen negative effects - I pass the cart_order value into another session variable within uc_cart_checkout_review, and pass it back into cart_order in uc_cart_checkout_review_form_submit under the case of Submit order submission.

I found the error occurring on every payment method I tried (COD/Check/Auth.net/CC/Other). I do have a small block that I'm using to display a certain product if it doesn't occur in the cart, but a particular other product does (a bit like 'this goes really well with that'), which calls uc_cart_get_contents, but that's about it. It's confined to the cart view page anyway. I have:

Donation / donation product
Recurring
Payment pack (for testing)
CC
Authorise.net (thanks for the ARB, Ryan)
Secure pages (error occurs with this disabled too, and it shouldn't make a difference because the form submission to checkout is all secure, so there is no session problem)

Some additional notes:
1) Only $_SESSION['cart_order'] gets cleared between cart/checkout/review and cart/checkout callback.
2) A new order is generated when returned to cart (although the old one is still in the order table), probably because the session variable gets wiped.
3) This is a new site, still under development, and the first couple of orders went through, I just don't know what was added that could be causing the problem. I thought it might have been Auth_CIM, but I fully uninstalled and deleted the module (although it doesn't drop the CIM tables - naughty naughty), so there are no function that can be invoked there.

- $Dave = array('state' => 'officially stumped');

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Same problem

Hmm... in core that variable only gets unset from the function that's screwing you up. Puzzled There was an issue where images and such might end up loading /cart which causes the cart_order to be reset so folks can't spoof the checkout process. You might check the URLs for resources in the HTML and see if anything points to the cart page.

dave_the_brave's picture
Offline
Joined: 08/07/2008
Juice: 79
Re: Re: Same problem

Interesting suggestion. And it worked. I tried the checkout with another theme and had no issues. Went back and revisited all the image and stylesheet links in my custom theme and replaced them to use base_path(), and that seems to have cleared up the problem altogether.

Still doesn't make much sense to me because there were no absolute paths specified, but it seems that the theme functions were somehow redirecting the page back to /cart, and the cart_order was being cleared (correctly) by the cart functions that ensure that no order object is set.

snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
Re: Re: Re: Same problem

that's it... thanks both of you!!! I owe you guys a beer!

naturesimple's picture
Offline
Joined: 04/20/2008
Juice: 27
Re: Re: Re: Re: Same problem

Thanks from me as well. I didn't get a chance to check through all of the steps listed in the discussion above, but my theme was causing the problem.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Re: Re: Re: Same problem

I think the issue is caused by an invalid path in the theme throwing a 404. I had an issue similar to this a year ago, but instead of not completing checkout, it would throw the order into Pending and leave it there. (Although I suspect that, had I been using the current version of Ubercart, the result would be the same as what you have been experiencing.)

And looking back it was caused by an image I was trying to show in a block, that did not exist.

--
Help directly fund development: Donate via PayPal!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Re: Re: Same problem

Mmm... I'd happily collect the beer if you'll be at Drupalcon Szeged. Eye-wink