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

Route redirect does not work with ember-latest #3089

Closed
pdwinkel opened this issue Aug 3, 2013 · 6 comments
Closed

Route redirect does not work with ember-latest #3089

pdwinkel opened this issue Aug 3, 2013 · 6 comments
Assignees
Labels

Comments

@pdwinkel
Copy link

pdwinkel commented Aug 3, 2013

See: http://jsbin.com/ucanam/578/

  1. Select 'Alfabet' and then e.g. 'a', the router redirects to 'bbb'.
  2. Select now 'b', and the router redirects again to 'bbb'

This works OK with the rc6.1 version.
When using the ember-latest version, the first step works, but selecting 'b' results in an abort:

Attempting transition to letter.index
Transition #5: Beginning validation for transition to letter.index
Transition #5: application: using context from already-active handler
Transition #5: application: validation succeeded, proceeding
Transition #5: alfabet: using context from already-active handler
Transition #5: alfabet: validation succeeded, proceeding
Transition #5: letter: calling beforeModel hook
Transition #5: letter: resolving model
Transition #5: letter: calling afterModel hook
Transition #5: letter: validation succeeded, proceeding
Transition #5: letter.index: calling beforeModel hook
Transition #5: letter.index: resolving model
Transition #5: letter.index: calling afterModel hook
Attempting transition to bbb
Transition #5: letter.index: transition was aborted
Transition #6: Beginning validation for transition to bbb
Transition #6: application: using context from already-active handler
Transition #6: application: validation succeeded, proceeding
Transition #6: alfabet: using context from already-active handler
Transition #6: alfabet: validation succeeded, proceeding
Transition #6: letter: using context from already-active handler
Transition #6: letter: validation succeeded, proceeding
Transition #6: bbb: using context from already-active handler
Transition #6: bbb: validation succeeded, proceeding
Transition #6: Validation succeeded, finalizing transition;
Transitioned into 'alfabet.letter.bbb'
Transition #6: TRANSITION COMPLETE.
Transition #5: detected abort. 

ember-latest is:

// Version: v1.0.0-rc.6-297-g5766659
// Last commit: 5766659 (2013-08-01 14:24:44 -0700)
@ghost ghost assigned machty Aug 3, 2013
@machty
Copy link
Contributor

machty commented Aug 5, 2013

To clarify:

Working RC6.1 JSBin
Broken Master JSBin

  1. Click 'alfabet'
  2. Click 'a'. Should display "LETTER: a", menu, BBB
  3. Click 'b'. Should display "LETTER: b", menu, BBB

Broken master seems to abort the transition that would cause "LETTER: _" to say "LETTER: b". Investigating why this seems to be the case.

@wagenet
Copy link
Member

wagenet commented Aug 23, 2013

Is this related to #3056?

@wagenet
Copy link
Member

wagenet commented Oct 13, 2013

@machty, what's the status of this?

@wagenet
Copy link
Member

wagenet commented Nov 9, 2013

@machty, ping.

@machty
Copy link
Contributor

machty commented Nov 11, 2013

The status is that there are a few corner cases in parameter preservation that aren't properly handled in router.js. I've taken a stab at this a few times but it's quite tricky, and perhaps router.js needs a mini refactor to handle all of these issues. I'd mentioned this elsewhere, but in particular, I think we need to embrace the concept that transitions and routers are somewhat similar in that they both have/represent route hierachies; the router represents hierarchies of routes that have been fully entered / are fully active. Transitions represent hierarchies of routes that are intended to be entered. If we unify these concepts we can likely better handle these corner cases of parameter preservation between old/new/active transitions. Otherwise I think the code is getting a little too out of hand.

Sorry about the delay on this, I'd like to start a refactor shortly, just need to talk to some more folk to see if I'm on the right trick with what i wanna do.

@machty
Copy link
Contributor

machty commented Nov 29, 2013

So this is the link I provided for Broken Ember master, and it seems to have been fixed...

http://jsbin.com/ucanam/627/

I thought this was going to be fixed by my router.js refactor stuff, but seems like this has already been fixed.

@machty machty closed this as completed Nov 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants