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

[Regression] render helper not targetable by render({into:...}) #10602

Closed
alexdiliberto opened this issue Mar 10, 2015 · 6 comments · Fixed by #10703
Closed

[Regression] render helper not targetable by render({into:...}) #10602

alexdiliberto opened this issue Mar 10, 2015 · 6 comments · Fixed by #10703
Assignees
Milestone

Comments

@alexdiliberto
Copy link
Contributor

Possible regression here...Here's a JSBin, works in 1.10 release but not in beta or canary

http://emberjs.jsbin.com/pefuki/1/edit?html,js,output

Running into an issue in the appendLiveRoute function when I explicitly pass into as an optional parameter to this.render()

Ember.assert("You attempted to render into '" + renderOptions.into + "' but it was not found", !renderOptions.into);

@alexdiliberto
Copy link
Contributor Author

As currently set up the only way I can get this to work is to change the this.render() to render into: application

      this.render(template, {
        into: 'application',
        outlet: 'modal-box'
      });

But it still doesn't hold parity with latest release, If I do that then it will error

TypeError: Cannot read property 'connectOutlet' of undefined

@ef4
Copy link
Contributor

ef4 commented Mar 20, 2015

Thanks for putting together the JSBin. This is indeed a regression.

@rwjblue, this should probably go in the 1.11.0 milestone but I leave that up to you.

I can see how to fix it, but it will be kinda gross. render is a thorn in our side that I will be very happy to axe in 2.0.

@ef4 ef4 changed the title [Regression] Assertion Failed:You attempted to render into 'modal' but it was not found [Regression] render helper not targetable by render({into:...}) Mar 20, 2015
@ef4
Copy link
Contributor

ef4 commented Mar 20, 2015

Sketch of how we can tack this old behavior onto the new infrastructure:

  • the outlet view will need to notice occurrences of the render helper in its ancestors (probably by looking at helperName), and if it finds one, grab its outlet state from there instead of going up to the next outlet.
  • the router will use _activeViews to inject the appropriate outlet state into the render-inserted view.

@rwjblue rwjblue added this to the 1.11.0 milestone Mar 20, 2015
@ef4 ef4 self-assigned this Mar 23, 2015
ef4 added a commit to ef4/ember.js that referenced this issue Mar 23, 2015
rwjblue referenced this issue Mar 23, 2015
[BUGFIX beta] fix outlets inside render helper
@alexdiliberto
Copy link
Contributor Author

@ef4 Thanks!

ef4 added a commit that referenced this issue Mar 26, 2015
@drobannx
Copy link

@ef4 Running into an issue since upgrading to 1.11 regarding code that changed in this area. I'm using the ember-modals addon which makes a call to this.render from a route with a template name and some options specifying how to render the template. The issue is that appendOrphan gets called but impersonateAnOutlet does not get called at all which is what sets the wasUsed value. I think this may be because impersonateAnOutlet only gets called in the renderHelper and not when calling this.render from a route. Is this an issue with the addon not setting things up correctly or a regression? Is there any other details I can provide for you?

@ef4
Copy link
Contributor

ef4 commented Mar 31, 2015

@drobannx please file a new issue, that sounds like a different problem.

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 a pull request may close this issue.

4 participants