JavaScript problem in Drupal 5.7 and UberCart Beta 7

Posts: 29
Joined: 08/18/2007

We have Drupal 5.7 running on a Mac OS X Server 10.4.11, and we are having trouble with JavaScript. We need some updated version or other fix, and can't find one that will work.

HERE'S THE HISTORY:

For a little while in the Fall, it gave us trouble, where Safari web browser would not run some of the JavaScript elements on some web pages. Alot of these were things on normal Drupal pages (some reveal arrows wouldn't work, certain searching interfaces that used JavaScript put extra characters in the search field, and all of the Interface Sortable demos of JavaScript, for example). Most glaringly, it made the JavaScript on our UberCart check out page fail (this was in many different versions of UberCart), so the JavaScript-based shipping calculations wouldn't work, and the user could not check out.

After some browsing the JavascriptTools Issues, I found a newer update to JavascriptTools and installed it in late Fall. This fixed the problem, and JavaScript worked everywhere across the site, on Safari and all other browsers.

HERE'S THE CURRENT PROBLEM:

Then, sometime in the past 3 months, the JavaScript stopped working again on Safari. I looked at my records on this, and I don't show an update to Safari in that time, and I don't show that I changed the JavascriptTools module.

So, now users can't check out on Ubercart due to the shipping calc failing; reveal arrows don't always work, and some searches get screwed up.

I found an even newer JavascriptTools update posted on some forum for the module, and that didn't help. I tried upgrading every JavaScript related module I could, and it didn't fix the problem at all (according to Available Updates, my site is fully up to date).

My site has become mostly useless to at least Safari users. Safari is the most common browser on the Mac, so it poses a similar problem to the people who an IE 6 on Windows -- people are going to use it, and I need my site to work on it. I upgraded Safari to the new 3.1 version and that didn't help. Besides, I'm not sure this is ONLY occurring on Safari -- it's just the only browser I've definitively recreated it on.

What do I do? JavaScript seems to be a house of cards here, yet both Drupal and Ubercart have begun to rely on it more and more. I can't find any other little openings in this situation to even try other fixes to see if they will work.

Posts: 167
Joined: 10/08/2007
Bug FinderGetting busy with the Ubercode.PayPal Hero

What is the url of a page that fails? You might have a confilicting module situation.

--

Christopher Schaub
LuteGrass, LLC
http://www.lutegrass.com

Posts: 29
Joined: 08/18/2007

Thanks for your reply. I appreciate your help.

The best way to see it is to add an item to the cart on our web site and then click check out. You don't need to create an account or try pay, you can see it on

So, you can go to, say, this page:

http://somatics.org/shop/products/hanna_thomas/somatics_reawakening_the_...

Add the item to cart and then go to the first step in the check out process, which you can get to from the cart or this link:

https://somatics.org/cart/checkout

You'll see the that the Calculate Shipping Cost box doesn't show anything, and that the Payment Method box doesn't show an order total or any subtotal lines as it should; and this is true even if you enter shipping and billing address info or if you click the Click to Calculate Shipping button. The Javascript seems to just fail.

If I click to calculate, or I try to proceed by clicking the Review Order button, I get the error message "You must select a shipping option before continuing."

Thanks in advance for your help!

Posts: 2243
Joined: 08/07/2007
AdministratoreLiTe!

Worked for me, but I hadn't put an address in yet. Saw "Pickup in store" and "Standard shipping" or whatever the $8.00 option was.

Posts: 29
Joined: 08/18/2007

Were you using Safari 3 or 3.1 on Mac OS X? That's where I'm seeing the problem most consistently.

Posts: 29
Joined: 08/18/2007

Does anyone know what I do about this? We're losing orders left and right because of this bug.

Posts: 5245
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

You may just have to find a Mac user and pay them to debug the issue. To clarify for others looking in, it's not that JS won't run at all, it's that the callback isn't being called properly - i.e. you click the "get shipping quotes" button and it submits the form instead of running the AJAX to get the quotes.

There have been other posted conflicts between other JS modules, so you might try disabling JS Tools altogether to see if the checkout page works then. Other than that, I can only recommend you make sure you're on or can update to the latest version of Ubercart.

Posts: 29
Joined: 08/18/2007

I followed Ryan's suggestion, and completely disabled JavascriptTools and all the other Javascript modules that depend on it. Then I tested the checkout page and it still had the same problems.

So, then I disabled Google Analytics and Google Analytics for Ubercart, as those modules claimed to put a Javascript on every page to feed to Google, so I was thinking it was possible those scripts were interfering. I tested the checkout page and still had the same problem.

I'm going to reenable JavascriptTools and Google analytics now, but I can re-disable them if anyone has any other debugging ideas.

I am on Ubercart Beta 7, and the latest version of all other modules.

Is no one else having this problem, with Safari or any other browsers?

I'm happy to pay someone to debug this, if that's what it takes -- this is killing our online sales. How do I find someone like that? Is there anyone who can do this?