Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
But I also have another JS error caused by Google Analytics Counter "Uncaught TypeError: Property '$' of object [object Window] is not a function" (Chrome) or "$ is not a function" (FF) on
$(document).ready(function(){
setTimeout("gac_request_new_count()",7000);
});
In normal js files there you start with:
(function ($) {
and end
})(jQuery);
But this you dont do in your inline code.
Cause of this you have to use jQuery() insted of $()
Comment | File | Size | Author |
---|---|---|---|
0001-google-analytics-counter__fix-inline-code-jQuery-issue.patch | 1.54 KB | greenrover33 |
Comments
Comment #1
greenrover33 CreditAttribution: greenrover33 commentedComment #2
Vacilando CreditAttribution: Vacilando commentedNice one, @greenrover33 -- now applied in 7.x-1.2!
Comment #3
Vacilando CreditAttribution: Vacilando commentedWe also need this fix for D6 -- care to supply roll that one as well, @greenrover33?
Comment #4
Vacilando CreditAttribution: Vacilando commentedSeems like the D6 version of GAC is not producing these JS errors. If you find it does, please reopen this issue.