8 replies [Last post]
don1one's picture
Offline
Joined: 04/21/2008
Juice: 122
Was this information Helpful?

Hi,
I just updated a client to ubercart-5.x-1.7. The problem now is that it will no longer process credit cards. I get:
Payment method
Select a payment method from the following options.
Javascript must be enabled to view the order total preview.

Firebug shows one javascript error, but there's no message in the console.
I've run update. I went back to payment setup and everything looks ok and carried over. Any ideas?

Thanks.
-Don-

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Update failure - Choose Credit Card

Hmm... gonna have to nail down that JS error. The Firebug console should be telling you something... if not, you can always try the Web Developer toolbar.

don1one's picture
Offline
Joined: 04/21/2008
Juice: 122
Re: Re: Update failure - Choose Credit Card

I'm guessing it's in an eval, but jquery doesn't seem to be real happy. I get an empty backtrace.
I noticed jquery was last updated in June.

Can someone who's updated tell me what version of jquery they're running? Thanks.

-Don-

[Exception... "'Syntax error, unrecognized expression: ]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]

don1one's picture
Offline
Joined: 04/21/2008
Juice: 122
Re: Re: Re: Update failure - Choose Credit Card

So far I've been able to get it to identify problems with uc_taxes.js.
if ($("input[@name*=delivery_]").length) - line 21
and delivery_ doesn't seem to be defined. I get a reference error in firebug too.

i see that taxes has given problems before. Is there a common solution?

-Don-

tcindie@drupal.org's picture
Offline
Getting busy with the Ubercode.
Joined: 05/15/2008
Juice: 440
Re: Re: Re: Update failure - Choose Credit Card

The latest jquery_update module gets you to jquery version 1.2.6... I believe they are in the process of making 1.3.1 work, but right now it breaks several things in drupal.

Follow me on twitter.

don1one's picture
Offline
Joined: 04/21/2008
Juice: 122
Re: Re: Re: Re: Update failure - Choose Credit Card

Thanks. I'm obviously behind at 1.1.2

I didn't know Chrome had a full javascript debugging interface. It's text box, kind of like debugging perl. But I'm finding things I can't between Firebug and Web Developer Toolbar.

Here's the error:
(source:"void(0)")
uncaught exception TypeError: Cannot read property 'getElementById' of undefined

Looking at the backtrace, the most recognizable element is "uc-cart-checkout-review-form".
Looks like it's out of uc_cart.js line 12.

don1one's picture
Offline
Joined: 04/21/2008
Juice: 122
All I'm getting is Error:

All I'm getting is
Error: ret[ret.length - 1] is undefined
Source File: http://www.southlandloghomes.com/misc/jquery.js/eval/O6qDqyV%2BKNEzsUDB9...
Line: 1

Is there more dependance on jquery's ready state in the new payment system? I still don't understand how only this update failed.

don1one's picture
Offline
Joined: 04/21/2008
Juice: 122
That's definitely the problem.

uc_cart.js
Starting at line 8. If I put a return at the top everything else works fine. I'll gather there is some error checking missing, I'll see if I can fix it later.

-Don-

/**
* Scan the DOM and display the cancel and continue buttons.
*/
$(document).ready(
function() {
return;
$('.show-onload').show();

$('form#uc-cart-checkout-review-form input#edit-submit').click(function() {
$(this).clone().insertAfter(this).attr('disabled', true).after('    ').end().hide();
$('#uc-cart-checkout-review-form #edit-back').attr('disabled', true);
});
}
);

gizmatix's picture
Offline
Joined: 09/09/2008
Juice: 159
My Error Logs

I'm also having this problem...
Versions Installed:
Drupal 6.13
Ubercart 2.0-rc3
JQuery 6.x-2.x-dev

I have checked off each product to be:
- everything under checkout panes is enabled
- shippable
- set flat rate settings
- added address for the company on store information
- added address to shipping area
- enabled default modules that should be enabled in the order they should be enabled in
- enabled to make sure UPS and Canadian post shipping types have been enabled
- tax has been setup(configured) as well
- i'm using flat rate so i set -1 for each and every product in the inventory list

No errors in logs and no other problems are occuring with the Ubercart or Drupal
- i ran cron and updated database
- i tried to disable all modules and reenabled everything starting with drupal core, core options, views, panels, cck, image (at least everything it told me to enable on the Ubercart setup page.

I can't figure out what i'm doing wrong i've gone through every page in the configuration area, persmissions area for the Users, module page to check if i left anything "unchecked".

Firebug shows this error on the checkout page:
1. uncaught exception: Syntax error, unrecognized expression: [@name*=delivery_]

Line 0
2. [Exception... "'Syntax error, unrecognized expression: [@value=---0]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]

Line 0