Closed (fixed)
Project:
Google Analytics
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Dec 2007 at 22:31 UTC
Updated:
27 Feb 2008 at 18:52 UTC
When you have the external download tracking on, using downloadtracker.js, and you also have prototype on your site you get a javascript error on every page. Prototype overwrites jquery's $ function. As a result of this $(document).ready(gaTrackerAttach) causes an error because $(document).ready is not a function. Simply replacing the $(document).ready(gaTrackerAttach) with jQuery(document).ready(gaTrackerAttach); will fix this.
Comments
Comment #1
buddaThansk. Fixed in CVS.
Comment #2
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
hass commentedI'm on the fence about committing this and i'm on the way to roll back the D5 patch. Drupal core uses
$for jquery replacement everywhere and.readyis widely used, too. Here are *only* two examples.textarea.js
autocomplete.js
@budda - whatever prototype does here - i don't know, but prototype need to be fixed *not* google_analytics.
Comment #4
hass commentedThis code change is not yet in sync with D6...
Comment #5
buddaI'm guessing here, but maybe the error doesn't show up with the Drupal Core js such as textareas because bkennedy isn't looking at pages with textareas on (comments or node edit forms).
What Prototype powered code is on the site to cause the errors bkennedy?
Using JQ() or JQuery() is still perfectly legal to use in any code as it's documented.
Comment #6
hass commentedWhatever name space we will use it might give conflicts... next time it will be the library xyz and so on and so on...
I don't know what prototype does here, but it sounds buggy and will cause many incompatibilities anywhere in drupal. I'm rolling back this change for now to be in sync with GA6 and D6 core. If someone find out the real cause and this is not a prototype bug and core is not affected at the same time, we could thing about a fix, but we should understand the real issue first.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.