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

[Canary] transitionTo from Ember.Route#activate nukes parent route template #11152

Open
poteto opened this issue May 13, 2015 · 6 comments
Open

Comments

@poteto
Copy link

poteto commented May 13, 2015

I encountered this bug in my own app running Canary (1.13.0-beta.1+canary.5ff3d02e), and have reproduced it below in a JSBin.

http://jsbin.com/mepasu/edit?html,js,output

In the above JSBin, there are 2 routes (page and page/show) being explicitly defined, with one being a child of another. Transitioning to one of these routes in the Application index route within its activate hook causes an issue where the page template disappears, leaving behind only its {{outlet}}.

If you navigate through the app by clicking on the buttons, you'll notice that you can still transition to page.index and page.show, but they no longer appear inside of the page template.

This issue only seems to affect the activate hook – if you uncomment beforeModel, model, or afterModel hooks, they work as expected. There are also no errors being logged/thrown.

cc @rwjblue

@rwjblue rwjblue added the Bug label May 13, 2015
@rwjblue
Copy link
Member

rwjblue commented May 13, 2015

Definitely weird. Will need to dig a bit more to have an idea of the root cause...

@acorncom
Copy link
Contributor

We should probably reproduce this issue with the latest canary to see if it's still a problem (possibly with Ember Twiddle)

@poteto
Copy link
Author

poteto commented Apr 19, 2016

I can get a twiddle up, but the jsbin is pointing to the canary channel so it still seems to be an issue

@poteto
Copy link
Author

poteto commented Apr 19, 2016

@pixelhandler
Copy link
Contributor

pixelhandler commented Jun 17, 2016

@poteto regarding…

This issue only seems to affect the activate hook – if you uncomment beforeModel, model, or afterModel hooks, they work as expected. There are also no errors being logged/thrown.

Could the solution be to not use activate for a transition? Is there a case that prevents you from using beforeModel()?

Would using redirect be a more viable solution?

Was there an Ember release where using activate for a transition did work?

@pixelhandler pixelhandler removed the Bug label Jun 17, 2016
@pixelhandler
Copy link
Contributor

pixelhandler commented Sep 14, 2018

Just checked on v3.4.1 and updated the twiddle, seems like the issue still happens.

@poteto did you find a work around? using the beforeModel hook in stead of activate does work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

5 participants