Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
toolbar.module
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Aug 2015 at 10:50 UTC
Updated:
6 Nov 2015 at 00:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
lauriiiComment #2
lauriiiComment #3
lauriiiComment #4
joelpittetI tried seeing if there is another way... nothing came to mind. I don't think trading drupal_render_children() for render() call is a great win because it's an early render either way and both global function calls...
Any other ideas @lauriii?
Comment #5
lauriiiMaybe we need to figure out if we could change the render api to conditionally render children of the render element also as render elements. Otherwise we always have to run an early render in this use case.
Comment #6
joelpittetI put this patch on the meta but probably should have put it here. It's the same thing but moving it closer to the source. It also fixes some issues around checking the #wrapper_attributes before building them up which is why the drupal_render_children needs to be called to move the RenderElement's #wrapper_attributes up to the tab/task.s
Comment #7
lauriiiShould we test if tray is array? If its rendered for some reason, this will fatal..
Comment #8
joelpittetI can't think of a scenario where that would every be a rendered variable. We are early rendering things here but not that doesn't change the $element render array other than adding extra #keys in preRender by reference.
Really don't think we need to do that check. !empty() is just a consistency and performance fix. If it becomes contentious I'll remove it from this patch so we can resolve this.
Comment #9
lauriiiToolbarItem fits the previous line but otherwise this is good. Can be fixed on commit.
Comment #10
xjmDiscussed with the D8 committers and we agreed with making this an rc target.
Comment #11
webchickJust to follow-up, the reason for this is because it's the last instance of this function (which circumvents the render system and causes caching problems), and this would allow us to mark it deprecated before 8.0.0. It's not "open season" on all cleanup patches. :D
Comment #12
webchickCommitted and pushed to 8.0.x. Thanks!