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

Failing test for issue with controllerName + queryParams + transitionTo #16988

Conversation

cafreeman
Copy link
Contributor

@cafreeman cafreeman commented Sep 18, 2018

When using the controllerName property to share a controller across a parent and child route, RouterService#transitionTo fails when attempting to transition to the route that that is "sharing" via controllerName.

For example, parent has a controller that defines queryParams as ['foo'], and parent.child uses controllerName: 'parent' to share the controller. Attempting to call RouterService#transitionTo('parent.child') will throw the following error:

Assertion Failed: You passed the `parent:foo` query parameter during a transition into parent.child, please update to foo

Based on the digging I've done so far, I can tell you that this assertion is happening in router.js here, and appears to be failing due to parentProp being undefined.

There appears to be prior discussion/work on this issue, as seen in the following commits/issues:

However, I haven't found anything related specifically to the controllerName issue, though the same assertion is being triggered in all cases.

Here is a twiddle that demonstrates the issue.

Fixes #14560.

@locks
Copy link
Contributor

locks commented May 30, 2019

@cafreeman are you able to rebase this PR?

@cafreeman cafreeman force-pushed the cfreeman/router_service_failing_test branch from 01a8515 to b7d1491 Compare June 11, 2019 20:07
@cafreeman
Copy link
Contributor Author

@locks just rebased

@cafreeman cafreeman closed this Mar 19, 2020
@cafreeman cafreeman deleted the cfreeman/router_service_failing_test branch March 19, 2020 15:51
@btecu
Copy link
Contributor

btecu commented Mar 19, 2020

@cafreeman Is this no longer an issue?

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.

Using controllerName with a parent controller that has a query-param causes assertion on Ember 2.10-beta.2.
3 participants