Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14534 closed defect (fixed)

[patch][cla] dojox.analytics.Urchin throws error in 1.7.1

Reported by: Caleb Maclennan Owned by: Colin Snover
Priority: blocker Milestone: 1.7.2
Component: Dojox Version: 1.7.1
Keywords: Cc: chrism1, dante, cjolif, Ed Chatelain
Blocked By: Blocking:

Description

Trying to instantiate a Google Analytics tracker from Dojo 1.7.1 using the dojox.analytics.Urchin widget throws the following error:

Uncaught TypeError?: Object [object Object] has no method 'get' a.(anonymous function) ga.js:11

I have tried instantiating via either declarative or programmatic markup as follows:

    <div data-dojo-type="dojox.analytics.Urchin"
        data-dojo-props='acct: "UA-88003-8"'>
    </div>

    require(["dojox/analytics/Urchin"], function(ga) {
        var analytics = new ga({acct: "UA-88003-8"});
    });

The declarative markup at least was exactly what I was successfully using in Dojo 1.6. The programmatic attempt is new but I think I have the syntax right. I am using a custom compile, but the stock libraries show the same problem in a control environment. For example, here is a JSFiddle that replicates the error.

Attachments (1)

dojox.analytics.Urchin.patch (338 bytes) - added by Caleb Maclennan 8 years ago.
Patch for #14534 (my CLA is on file)

Download all attachments as: .zip

Change History (12)

comment:1 Changed 8 years ago by Adam Peller

Cc: chrism1 dante added
Milestone: tbd1.7.2
Owner: changed from Adam Peller to Dustin Machi

comment:2 Changed 8 years ago by ben hockey

in trackPageView:

this.tracker._trackPageview.apply(this, arguments);

should be

this.tracker._trackPageview.apply(this.tracker, arguments);

comment:3 Changed 8 years ago by Adam Peller

@neonstalwart: perhaps, but that code was the same in 1.6. Is there another regression?

comment:4 Changed 8 years ago by ben hockey

same problem with dojo 1.6 http://jsfiddle.net/neonstalwart/S3Ysc/ - ga.js must have changed.

Changed 8 years ago by Caleb Maclennan

Patch for #14534 (my CLA is on file)

comment:5 Changed 8 years ago by cjolif

Cc: cjolif Ed Chatelain added

comment:6 Changed 8 years ago by Colin Snover

Milestone: 1.7.21.7.3

1.7.2 RC released, bumping milestone on remaining tickets.

comment:7 in reply to:  6 Changed 8 years ago by Caleb Maclennan

Replying to csnover:

1.7.2 RC released, bumping milestone on remaining tickets.

Is there some specific reason this issue is getting held up? Is there anything else the community can do to make this happen? Somebody else pointed out the exact issue, I submitted a patch and 1.7.2 is supposed to be a bugfix release! This is a bug. Sites that rely on this module for analytics have a long stretch of broken numbers unless (like I've had to do on many sites) they patch dojo or revert to coding this up outside of dojo.

comment:8 Changed 8 years ago by Colin Snover

Priority: highblocker
Status: newopen
Summary: dojox.analytics.Urchin throws error in 1.7.1[patch][cla] dojox.analytics.Urchin throws error in 1.7.1

Sorry for the difficulty; this fell under the radar. I’ll set it blocking for 1.7.3 since you have provided a patch.

comment:9 Changed 8 years ago by dylan

Milestone: 1.7.31.7.2
Owner: changed from Dustin Machi to Colin Snover
Status: openassigned

Agreed, looks like we need to patch 1.5.x and 1.6.x with this as well. Given the very minor change, and multiple confirmations that this fix works, let's get it into 1.7.2.

comment:10 Changed 8 years ago by Colin Snover

Resolution: fixed
Status: assignedclosed

In [27881]:

Fix #14534. Thanks to alerque for the patch.

comment:11 Changed 8 years ago by Colin Snover

[27882] is backport for 1.7.2 but didn’t get linked up because I don’t know how to do commit messages :'(

Note: See TracTickets for help on using tickets.