Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correcting error #130 - changing @stop to pause() #143

Merged
merged 1 commit into from
Apr 7, 2014
Merged

Correcting error #130 - changing @stop to pause() #143

merged 1 commit into from
Apr 7, 2014

Conversation

Art1Sec8
Copy link
Contributor

@Art1Sec8 Art1Sec8 commented Apr 5, 2014

This appears to fix issue #130:
#130

@Stop is depreciated in iron-router 0.7.0 and going forward we should use @Pause(). When @Stop is used in the entrySignOut route, BlazeLayout throws the following error in the console (client side):

Exception from Deps recompute function: Error: BlazeLayout: Sorry, couldn't find a template named entrySignOut. Are you sure you defined it?

Replacing @Stop with @Pause seems to fix the issue.

This appears to fix issue #130:
#130

@Stop is depreciated in iron-router 0.7.0 and going forward we should use @Pause().  When @Stop is used in the entrySignOut route, BlazeLayout throws the following error in the console (client side):

Exception from Deps recompute function: Error: BlazeLayout: Sorry, couldn't find a template named entrySignOut. Are you sure you defined it?

Replaces @Stop with @Pause seems to fix the issue.
queso added a commit that referenced this pull request Apr 7, 2014
Correcting error #130 - changing @Stop to @Pause()
@queso queso merged commit f9abbc5 into Differential:master Apr 7, 2014
@cinjon
Copy link

cinjon commented Apr 15, 2014

I'm getting an error on this: "Uncaught TypeError: undefined is not a function" at line 27 in router.coffee, i.e. where this switch occurred. Are you guys not getting that?

@hellogerard
Copy link
Contributor

Hmm,

You have to change line 22 from:

    onBeforeAction: ->

to

    onBeforeAction: (pause) ->

@cinjon
Copy link

cinjon commented Apr 15, 2014

Thanks for the quick reply Gerard. That didn't work though (it's also not on the router.coffee for this commit). Any other ideas?

@hellogerard
Copy link
Contributor

Sorry then. I didn't actually try this. I just know it was a change in
blaze.

On Tuesday, April 15, 2014, cinjon notifications@github.com wrote:

Thanks for the quick reply Gerard. That didn't work though (it's also not
on the router.coffee for this commit). Any other ideas?

Reply to this email directly or view it on GitHubhttps://github.com//pull/143#issuecomment-40535109
.

Sent from my mobile device.

@Art1Sec8
Copy link
Contributor Author

@cinjon I wasn't getting this error before, but I am getting it now. I am not sure what changed. But, I will try to dig into it when I can.

@matthewfieger
Copy link

I am also getting "Uncaught TypeError: undefined is not a function" on sign-out. I have @Pause() in line 27 of router.coffee.

@dkoo761
Copy link
Contributor

dkoo761 commented May 4, 2014

+1 I am also getting this error now.

@Art1Sec8 Art1Sec8 changed the title Correcting error #130 - changing @stop to @pause() Correcting error #130 - changing @stop to pause() May 5, 2014
@Art1Sec8
Copy link
Contributor Author

Art1Sec8 commented May 5, 2014

Ok; I think I may have gotten this one now. Take a look at iron-meteor/iron-router#620

Looks like the the issue is that pause needs to be passed as a parameter like so:

 @route 'entrySignOut',
    path: '/sign-out'
    onBeforeAction: (pause)->
      Session.set('entryError', undefined)
      if AccountsEntry.settings.homeRoute
        Meteor.logout () ->
          Router.go AccountsEntry.settings.homeRoute
        pause();

I put together a PR: #168

@matthewfieger
Copy link

That worked for me. Thanks!

@dgarzon
Copy link

dgarzon commented May 6, 2014

Thank you @Art1Sec8 that fixed the problem!

queso added a commit that referenced this pull request May 6, 2014
updating #143 which attempts to correct error #130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants