fluid-components icon indicating copy to clipboard operation
fluid-components copied to clipboard

Do not fetch ContentViewhelper nodes recursively

Open sascha-egerer opened this issue 1 year ago • 3 comments

Content ViewHelpers should only be fetched as direct children, not recursively. Fetching them recursively in templates will not work if components are nested, as slots of the inner component would also be applied to the outer component. Placing content in an if-else block, thus defining the content twice, will also not work and would no longer be possible with this change, which should prevent some headaches.

sascha-egerer avatar Jul 02 '24 21:07 sascha-egerer

Not sure about the general state of the tests, but this seems to break a lot of them that test slot functionality.

s2b avatar Jul 03 '24 07:07 s2b

Yes sorry it is broken. I’m working on it. I thought I did not yet open the PR. Will push a new version later and also add tests

sascha-egerer avatar Jul 03 '24 07:07 sascha-egerer

@s2b I have added two new tests with nested components that are using slots. Maybe you can have a look and run the workflow

sascha-egerer avatar Jul 05 '24 10:07 sascha-egerer