17 replies [Last post]
somatics's picture
Offline
Joined: 08/18/2007
Juice: 121
Was this information Helpful?

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.

schaub123's picture
Offline
Bug FinderGetting busy with the Ubercode.PayPal Hero
Joined: 10/08/2007
Juice: 458
Re: JavaScript problem in Drupal 5.7 and UberCart Beta 7

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

Christopher Schaub

somatics's picture
Offline
Joined: 08/18/2007
Juice: 121
Re: Re: JavaScript problem in Drupal 5.7 and UberCart Beta 7

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!

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6855
Re: Re: Re: JavaScript problem in Drupal 5.7 and UberCart Beta 7

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.

somatics's picture
Offline
Joined: 08/18/2007
Juice: 121
Re: Re: Re: Re: JavaScript problem in Drupal 5.7 and UberCart Be

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

somatics's picture
Offline
Joined: 08/18/2007
Juice: 121
Re: Re: Re: Re: JavaScript problem in Drupal 5.7 and UberCart Be

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

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15459
Re: Re: Re: Re: Re: JavaScript problem in Drupal 5.7 and UberCar

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.

somatics's picture
Offline
Joined: 08/18/2007
Juice: 121
Re: Re: Re: Re: Re: Re: JavaScript problem in Drupal 5.7 and Ube

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?

somatics's picture
Offline
Joined: 08/18/2007
Juice: 121
Re: Re: Re: Re: Re: Re: JavaScript problem in Drupal 5.7 and Ube

I hope someone can help us with this issue. You can read the first post in this topic for more details, and the rest of the topic for the history, but here's the summary:

1. The Checkout page does not work in our Ubercart 1 installation under Drupal 5. It really seems to be a Javascript issue. It has been going on for about a year and a half and is destroying our online business. We have seen about 90% drop in online sales as a result of this. We need help.

2. When you try to check out, it does not display the radio buttons to select a shipping option, even if you click the button "Click to calculate shipping". As a result, you cannot proceed to the next page because you get an error message that says "You must select a shipping option before continuing."

3. Another indication that it's a JavaScript issue is that under the Payment Method section, it says:
Payment method
Select a payment method from the following options.
Javascript must be enabled to view the order total preview.

4. Another indication that it's a JavaScript issue is that the symptoms changed as there were changes to JavaScript about 14 months ago.

5. A year ago, it seemed to just be in Safari and Internet Explorer 6. We figured, as some point IE7 would be more widely adopted, and we also understood most people don't care about the Mac, so we couldn't complain much. However, it turns out it does not work on IE 7 either -- we get reports of this from users all the time. And last week we were told it is not working on Google Chrome for Windows either. So, at this point, the ONLY browser it seems to work on is Firefox for Mac & Window. To process orders in our office, we use Firefox for Mac.

6. At first we thought it was an issue with our custom theme, however, we are now using the Zen theme, which is possibly the mostly widely used Drupal theme. I do not know what more can make this a larger issue than just our platform and theme; this is not a site using proprietary configurations or wanting to run on an obscure browser.

7. We are using the latest production version of Ubercart 1 and the latest version of Drupal and we are not using the Addresses module, which was causing us major problems.

8. This is not just a Mac issue.

I have attached a screenshot of the Javascrip not showing the shipping options or order total preview.

We have invested thousands of hours into our Drupal and Ubercart site and we are desperately up a creek. Can someone please help us?

AttachmentSize
Picture 2.png 68.53 KB
somatics's picture
Offline
Joined: 08/18/2007
Juice: 121
Re: Re: Re: Re: Re: Re: Re: JavaScript problem in Drupal 5.7 and

Update: It turns out it's a problem with ALL browsers we can find: We just tested it in Firefox, and it is a problem there too. So, the only way we can check an order out is through the Admin interface for that. For whatever reason, that Javascript interface does not fail. However, the Javascript does seem to be failing consistently across browsers for the customer checkout page.

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3300
Re: Re: Re: Re: Re: Re: Re: Re: JavaScript problem in Drupal 5.7

Yes, there's a JavaScript error on your checkout page that causing the failure. Most likely it is because you have jQuery Update 1.0 installed. Ubercart JavaScript works well with the version of jQuery that comes with Drupal, and it also works well with jQuery Update 2.0, but there have occasionally been reports of conflicts with jQuery Update 1.0 because of some syntax changes in jQuery. Solution is move to jQuery Update 2.0 or remove jQuery Update entirely (meaning you have to physically copy the original jquery.js back into your misc folder.

I strongly recommend Firebug for Firefox as a way to quickly and easily find things like this.

<tr>.
somatics's picture
Offline
Joined: 08/18/2007
Juice: 121
Re: Re: Re: Re: Re: Re: Re: Re: Re: JavaScript problem in Drupal

Wow, thanks for this post. It didn't fix the problem, but it's getting us there:

I put jQuery Update 2.0 in place, and one browser changed on one computer -- On my 2008 MacBook Pro running the latest version of OS X Leopard (10.5.6) with all the javascript etc. software updates installed, only on Safari (v3.2.1) will it now show the order total, the shipping options and the credit card fields if credit card is selected as the payment method.

On Firefox and the Chrome development shell on that computer, it's not working -- same problem of it saying that Javascript must be enabled. On Firefox, etc. on other computers with the same OS and the same software updates, it's not working -- including not working on Safari!

Does this one change -- Safari on my computer succeeding with this -- help anyone figure out what I should do next?

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3300
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: JavaScript problem in Dr

Your site now works for me with Firefox and IE. Firebug shows that your site's using jQuery 1.2.6, which is jQuery 2.0. I suggest flushing your browser cache and trying again, since you probably still have the old jquery.js in your browser cache. It wouldn't hurt to truncate all the cache tables on your server either.

<tr>.
somatics's picture
Offline
Joined: 08/18/2007
Juice: 121
JQuery related JavaScript problem in checkout - ends checkout!

Thanks for everyone's help with this so far. We really appreciate it! Unfortunately, the problem continues!!!

The solution TR proposed worked for a month or 2 and then our checkout stopped working again. People using many browsers on many platforms report issues on the checkout page on some or all of the javascript related regions of it. Myself, I find the problem mostly on the order total calculation and the shipping quote.

This problem persisted across multiple upgrades of the OS -- Mac OS X Server 10.5 with all the latest javascript updates installed as they were released. We just recently updated to 10.6 and the problem is the same.

I installed Firebug as TR suggested and watched the error reporting. And the two regions I had problems with showed the errors below:

POST http://somatics.org/?q=taxes/calculate     500 Internal Server Error     1.43s     jquery.js (line 11)

POST http://somatics.org/?q=cart/checkout/shipping/quote     500 Internal Server Error     1.18s     jquery.js (line 11)

I have looked all over the web for a newer version of JQuery than 1.2.6, including on the Drupal website and on the JSUpdate module page: All version on that page for Drupal 5, including the dev version, are 1.2.6. I even tried the file from the JSUpdate for Drupal 6, and that _reeeeally_ didn't work.

I don't know what to do. I don't know what else I can update. Our company has invested all our resources over the past few years into running our store on Ubercart, and our business is basically paralyzed now for an extended period of time. And each time I think we've fixed it, we're back where we started.

Does anyone know how I can fix this?

Strompf's picture
Offline
Joined: 12/27/2008
Juice: 69
I solved a similar problem

Hi folks,

Just in case this gets indexed by Google: I had a similar problem: JScript refused to function on the Checkout page, although it did function on other pages. I thought I caused the problem by being a bit too experimental with settings for flat fees, in combination with rules in workflow-ng.

The Misc directory had a jquery.js which after opening, turned out to be version 1.1.2. There was also a file jquery.bk01.js which turned out to be version 1.6. When I made the latter the active version, the problem disappeared. I liked that.

Regards,
Jeroen Strompf.

P.s.: Along the way I installed Firebug, as suggested above, but within the 10 minutes that I experimented with it, I wasn't yet able to identify the version of the jquery.js file being used.

bradezone's picture
Offline
Joined: 12/02/2009
Juice: 23
Re: JavaScript problem in Drupal 5.7 and UberCart Beta 7

Just wanted to chime in since I'm having this issue as well. I updated all modules and core for D6, and the problem seems to occur only on Google Chrome.
It also appears to have started happening once we switched from an Apache server to a Cherokee server.
It still works fine on Firefox, as well as Safari (thus it doesn't seem to be a webkit issue). But Google Chrome is not having it...

I'm still looking into it and will post if I find anything. Otherwise help is appreciated =]

bradezone's picture
Offline
Joined: 12/02/2009
Juice: 23
More info:

Basically Google Chrome seems to be timing out on the ajax call:
/cart/checkout/line_items

But only if called from a secure page (which of course the checkout page SHOULD be).
Even when I fine-tune the Secure Pages settings to allow the line_items call NOT to be https, it still fails =[
So in my case, it seems to be the way Google Chrome handles ajax requests on a https page, but seemingly only when served by Cherokee (et. al.) and not Apache?
Very obscure... Still looking for a workable fix.

bradezone's picture
Offline
Joined: 12/02/2009
Juice: 23
Still more info:

FYI I've posted about this issue on Google Chrome forum:
http://www.google.com/support/forum/p/Chrome/thread?tid=7d50c093bd4f8f6c...

And Cherokee server mailing list:
http://cherokee-web-server-general.1049476.n5.nabble.com/Google-Chrome-f...

So that might help some people.

Even though this technically might not be an Ubercart problem, I still can't help wondering WHY ajax calls are truly necessary in this section of Ubercart.
Seems to be asking for trouble, and why assume all buyers have javascript enabled?