I am using ubercart, as well as javascript aggregation, on a Drupal 5.7 site.
However, when JavaScript Aggregation is enabled, my ubercart javascripts never show up (so customers are never able to enter any credit card info, etc).
I tried to exclude these javascripts (see below), (trying with and without the ?), but the .js's that include a "?" do not correctly get excluded;
with javascript aggregation turned on ONLY uc_taxes.js is added separate from the aggrated js's.
/modules/ubercart/uc_cart/uc_cart.js
/modules/ubercart/uc_cart/uc_cart.js?79487
/modules/ubercart/uc_store/uc_country_select.js
/modules/ubercart/uc_store/uc_country_select.js?79492
/modules/ubercart/payment/uc_payment/uc_payment.js
/modules/ubercart/payment/uc_payment/uc_payment.js?79483
/modules/ubercart/uc_taxes/uc_taxes.js
Does anyone know how to get around this issue of the "?"s for a case like this?
Thanks



Re: issue with javascript aggregation due to "?"
(this issue is specifically referring to users' view of the checkout page)
Re: Re: issue with javascript aggregation due to "?"
Interesting... the query strings were added in to prevent stale JS from hanging around longer than we want it to. I suppose we need to check to make sure caching isn't on before adding that?
Re: Re: Re: issue with javascript aggregation due to "?"
is there some other alternative than using the "?" to mark version? Then I would be able to exclude this from something like the javascript aggregation without issues of dealing with a special character like "?"
Re: Re: Re: Re: issue with javascript aggregation due to "?"
Seems to me this is a bug with the JavaScript aggregator's parsing and handling of URLs you want to exclude. The list you give above are all valid URLs - Ubercart isn't doing anything wrong here. Have you posted a bug report for the aggregator?
drupal.org javascript aggregator module issue
yes, the issue is posted at:
http://drupal.org/node/260811
UC JavaScript not loaded, but not using JavaScript Aggregator
UC is unusuable in our Drupal 5.7 system because much of UC's JavaScript doesn't get loaded. We don't know why, since all the other Drupal modules we use (many) work perfectly.
We do not use add-on module JavaScript Aggregator nor any other module that knowingly affects JavaScript, and we know of no setting that would affect it.
Is it possible that the METHOD used by UC to call its .js files is getting filtered out somewhere? There are many ways to load a .js file and perhaps UC's method isn't universally supported in Drupal, and/or gets messed up by path or other factors???
We wonder if UC's failure to load JavaScript reliably could also explain our other show-stopper, the failure of UC's calls to ImageMagick to find image files that are right where the error says they are NOT.
The function uc_add_js() is
The function uc_add_js() is simply a wrapper for drupal_add_js()... nothing special going on there that would prevent the JS being loaded under normal circumstances.
Re: UC JavaScript not loaded, but not using JavaScript Aggregato
Are you sure you are running D5.7? In the most recent update to 5.8, the core Block module contains a bug that prevents the loading of JS that is called from global blocks. (See my Issue in the Ubercart Issue Queue, on this website, for details on that.)
when is uc_add_js() called?
I guess the question is, what defines "normal circumstances" and how can I check this?
My Drupal system has been running since 4.5 or so, now at 5.7, going to 5.8 soon. I've never had a problem with JavaScript on this site (though most modules don't use it much since it's so easily broken by the user's browser and/or security software). But still, I have no evidence that JavaScript doesn't work in my Drupal environment.
So, maybe UC's calls to load its .js files is not happening. Where should it happen?
Does UC rely on my theme templates for anything? I use Drupal's standard "bluemarine" just slightly hacked for appearance, but not in a way that would affect .js loading (and it doesn't affect any other .js loading that I know of).
Re: when is uc_add_js() called?
Discussion moved back to the original thread.
Re: issue with javascript aggregation due to "?"
What about just changing the line in uc_store to have caching off for uc_add_js calls? Better than having to turn it off site wide...
### Eclipse Workspace Patch 1.0
Index: sites/all/modules/ubercart/uc_store/uc_store.module
diff -u -r1.2 uc_store.module
--- sites/all/modules/ubercart/uc_store/uc_store.module 10 Sep 2008 15:43:32 -0000 1.2
+++ sites/all/modules/ubercart/uc_store/uc_store.module 10 Sep 2008 19:49:28 -0000
@@ -2742,7 +2742,7 @@
}
// Wrapper for uc_add_js() to cache .js files based on their timestamp.
-function uc_add_js($data = NULL, $type = 'module', $scope = 'header', $defer = FALSE, $cache = TRUE) {
+function uc_add_js($data = NULL, $type = 'module', $scope = 'header', $defer = FALSE, $cache = FALSE) {
// If we're adding a module or theme .js file...
if (($type == 'module' || $type == 'theme') && $cache) {
// And the file actually exists...
Re: Re: issue with javascript aggregation due to "?"
Fixed by Lyle, http://drupal.org/node/290482.