analytics function doesn't send t object #43

Closed
opened 2015-11-12 14:50:32 -05:00 by rstacruz · 17 comments
rstacruz commented 2015-11-12 14:50:32 -05:00 (Migrated from github.com)

Using v0.1.4, I'm getting this error:

                this.options.analytics = this.options.analytics || function(t) {
                    window._gaq && _gaq.push(["_trackPageview"]),
                    window.ga && ga("send", "pageview", {
                        page: t.url, # Uncaught TypeError: Cannot read property 'url' of undefined
                        title: t.title
                    })
                }
Using v0.1.4, I'm getting this error: ``` js this.options.analytics = this.options.analytics || function(t) { window._gaq && _gaq.push(["_trackPageview"]), window.ga && ga("send", "pageview", { page: t.url, # Uncaught TypeError: Cannot read property 'url' of undefined title: t.title }) } ```
MoOx commented 2015-11-12 15:15:04 -05:00 (Migrated from github.com)

where do you find this t thing ? I am not using this lib anymore and struggle to find something about it, sorry :/

where do you find this `t` thing ? I am not using this lib anymore and struggle to find something about it, sorry :/
rstacruz commented 2015-11-12 15:22:55 -05:00 (Migrated from github.com)
It's from here: https://github.com/MoOx/pjax/blob/6eafcf8dc61742adfb0bc7a0f401a849366f1422/lib/proto/parse-options.js#L10-L20
MoOx commented 2015-11-12 15:23:04 -05:00 (Migrated from github.com)

From what I can read, indeed it's not send. Not sure why I did that :(

From what I can read, indeed it's not send. Not sure why I did that :(
MoOx commented 2015-11-12 15:23:52 -05:00 (Migrated from github.com)

This lib wasn't tested before 0.2, but it seems 0.2 is not working and nobody wants to contribute :/

This lib wasn't tested before 0.2, but it seems 0.2 is not working and nobody wants to contribute :/
rstacruz commented 2015-11-12 15:26:04 -05:00 (Migrated from github.com)

any pointers on how we can fix 0.2?

any pointers on how we can fix 0.2?
MoOx commented 2015-11-12 15:28:05 -05:00 (Migrated from github.com)

I "just" splited the code into small pieces, in order to facilitate testing. It seems tests are broken and I think I didn't finish a test or something like that. Should not be a big deal, but "we" just need to find what is going wrong :/

I "just" splited the code into small pieces, in order to facilitate testing. It seems tests are broken and I think I didn't finish a test or something like that. Should not be a big deal, but "we" just need to find what is going wrong :/
MoOx commented 2015-11-12 15:28:38 -05:00 (Migrated from github.com)

Maybe you can try "npm install & npm test" and see what happens? :D

Maybe you can try "npm install & npm test" and see what happens? :D
MoOx commented 2015-11-12 15:28:46 -05:00 (Migrated from github.com)

I can add you as a collab if you want

I can add you as a collab if you want
rstacruz commented 2015-11-12 18:23:55 -05:00 (Migrated from github.com)

it breaks because one test has t.fail in it:

https://github.com/MoOx/pjax/blob/master/tests/lib/switch-selectors.js#L6

no indication as to why it's made to fail though.

edit: its introduced here at #20

it breaks because one test has `t.fail` in it: https://github.com/MoOx/pjax/blob/master/tests/lib/switch-selectors.js#L6 no indication as to why it's made to fail though. edit: its introduced [here](https://github.com/MoOx/pjax/commit/414650113b549a666d81b637931924d3ae6d4757) at #20
darylteo commented 2016-01-04 18:52:37 -05:00 (Migrated from github.com)

It's made to fail because there is no test written for it yet.

Switch Selectors also seems to be broken with issue #46 so I will look to fix that one and implement tests for it.

EDIT:
PR #52 patches switch-selectors.js test

It's made to fail because there is no test written for it yet. Switch Selectors also seems to be broken with issue #46 so I will look to fix that one and implement tests for it. EDIT: PR #52 patches switch-selectors.js test
MoOx commented 2016-01-05 01:20:07 -05:00 (Migrated from github.com)

So is this fixed now (sorry I am lazy)?

So is this fixed now (sorry I am lazy)?
darylteo commented 2016-01-05 01:23:34 -05:00 (Migrated from github.com)

No I only fixed the failing test.

Not sure what the issue is in this one because the line of code referenced
doesn't seem to exist in the code base anymore.
On Tue, Jan 5, 2016 at 5:20 PM Maxime Thirouin notifications@github.com
wrote:

So is this fixed now (sorry I am lazy)?


Reply to this email directly or view it on GitHub
https://github.com/MoOx/pjax/issues/43#issuecomment-168914234.

No I only fixed the failing test. Not sure what the issue is in this one because the line of code referenced doesn't seem to exist in the code base anymore. On Tue, Jan 5, 2016 at 5:20 PM Maxime Thirouin notifications@github.com wrote: > So is this fixed now (sorry I am lazy)? > > — > Reply to this email directly or view it on GitHub > https://github.com/MoOx/pjax/issues/43#issuecomment-168914234.
rstacruz commented 2016-01-05 01:24:59 -05:00 (Migrated from github.com)

@moox, on a side note, may i ask why you're not using this library anymore?

for me: the alternatives are to use jquery.pjax and wiselinks, both of which rely on jQuery, which I'd prefer not to be a dependency.

@moox, on a side note, may i ask why you're not using this library anymore? for me: the alternatives are to use jquery.pjax and wiselinks, both of which rely on jQuery, which I'd prefer not to be a dependency.
MoOx commented 2016-01-05 01:25:49 -05:00 (Migrated from github.com)

I now only build webapps with React (for the last two years) :)

I now only build webapps with React (for the last two years) :)
rstacruz commented 2016-01-05 01:26:24 -05:00 (Migrated from github.com)

ah, haha, right

ah, haha, right
darylteo commented 2016-01-05 01:27:01 -05:00 (Migrated from github.com)

What about us poor legacy maintainers ...

grumbles
On Tue, Jan 5, 2016 at 5:26 PM Rico Sta. Cruz notifications@github.com
wrote:

ah, haha, right


Reply to this email directly or view it on GitHub
https://github.com/MoOx/pjax/issues/43#issuecomment-168915306.

What about us poor legacy maintainers ... _grumbles_ On Tue, Jan 5, 2016 at 5:26 PM Rico Sta. Cruz notifications@github.com wrote: > ah, haha, right > > — > Reply to this email directly or view it on GitHub > https://github.com/MoOx/pjax/issues/43#issuecomment-168915306.
BehindTheMath commented 2017-12-20 16:18:57 -05:00 (Migrated from github.com)

This should be fixed by #59.

This should be fixed by #59.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#43