Review main Merged

20585[BUGFIX] Nested FLUIDTEMPLATE doesn't work anymore

Stefan Galinski CR +2 V +2 Easy +39 −1 updated 06/17/13, 20:16

Commit message

It's impossible since version 6.0 to render a
FLUIDTEMPLATE content object inside a
FLUIDTEMPLATE, because the internal fluid view
instance of the parent FLUIDTEMPLATE will be
overridden by the children FLUIDTEMPLATE.

Review

  • Code review CR +2
    • Stefan Neufeind +2
  • Verified V +2
    • Stefan Neufeind +2

Files 2

Review log 21

  1. Stefan Neufeind commented on patch set 1 05/27/13, 17:19

    @Stefan G: hmm, but this even seems to work without the patch. Or did I understand you wrong? A template outputting a text with a variable that is fed through another template ... page = PAGE page.10 = FLUIDTEMPLATE page.10.template = COA page.10.template { 10 = FLUIDTEMPLATE 10.template = TEXT 10.template.value = {aaa} 10.variables { aaa = TEXT aaa.value = {abc} } 20 = FLUIDTEMPLATE 20.template = TEXT 20.template.value = {def} 20.variables { def = TEXT def.value = 456 } 30 = TEXT 30.value = {abc} } page.10.variables { abc = TEXT abc.value = 789 }
  2. Stefan Neufeind commented on patch set 1 05/27/13, 17:19

    Hmm, but that wasn't recursive inside fluid, right? So here are two other strange test-cases that work with and without your patch. Please provide some input how to trigger your special case ... /* case 1*/ lib.innerFluid = FLUIDTEMPLATE lib.innerFluid.template = TEXT lib.innerFluid.template.value = {aaa} lib.innerFluid.variables { aaa = TEXT aaa.value = {abc} } } page = PAGE page.10 = FLUIDTEMPLATE page.10.template = TEXT page.10.template.value = AAA<f:cObject typoscriptObjectPath="lib.innerFluid" />BBB page.10.variables { abc = TEXT abc.value = 789 } /* case 2 */ page = PAGE page.10 = FLUIDTEMPLATE page.10.template = TEXT page.10.template.value ( <f:section name="xy"> x{abc}y </f:section> X<f:render section="xy" arguments="{abc: abc}" />Y{abc} ) page.10.variables { abc = TEXT abc.value = 789 }
  3. Stefan Galinski commented on patch set 1 05/27/13, 17:19

    Don't think that this will be possible in a useful way with an unit test, but maybe someone else has an idea. IMHO this is a typical candidate for an integration test.
  4. Christian Kuhn commented on patch set 1 05/27/13, 17:19

    The class is covered by unit tests ... is this case testable?
  5. Mr. Jenkins commented on patch set 1 05/27/13, 17:19

  6. Mr. Jenkins commented on patch set 1 05/27/13, 17:19

  7. Stefan Galinski updated the commit message in patch set 1 06/10/13, 13:51

  8. Mr. Jenkins commented on patch set 2 06/10/13, 13:52

  9. Stefan Galinski commented on patch set 2 06/10/13, 13:55

    Hi Stefan, Please use the following typoscript code to test the issue. lib.innerFluid = FLUIDTEMPLATE lib.innerFluid.template = TEXT lib.innerFluid.template.value = B page = PAGE page.10 = FLUIDTEMPLATE page.10.template = TEXT page.10.template.value = A{anotherFluidTemplate}C page.10.variables { anotherFluidTemplate < lib.innerFluid }
  10. Philipp Gampe commented on patch set 2 06/11/13, 16:39

    @Stefan could you create a unit test based on the sample you provided? Just turn the TS into the array and test the render object.
  11. Stefan Neufeind uploaded patch set 3 06/14/13, 01:24

  12. Stefan Neufeind commented on patch set 3 V +1 CR +1 06/14/13, 01:25

    Added the testcase described by StefanG.
  13. Stefan Neufeind commented on patch set 3 V 0 CR 0 06/14/13, 01:29

    @StefanG: Your testcase seems to work even without the patch? Maybe you can easier see why ...

    FluidTemplateContentObjectTest.php:580

    one empty row too much
  14. Stefan Galinski uploaded patch set 4 06/17/13, 18:52

  15. Mr. Jenkins commented on patch set 4 06/17/13, 18:53

  16. Stefan Galinski commented on patch set 4 06/17/13, 18:54

    Hi Stefan, Great that you found a solution how to create a unit test for this case. I just fixed it to correctly reflect the issue with nested fluid templates. :-)
  17. Wouter Wolters commented on patch set 4 V +1 CR +1 06/17/13, 18:56

    Tested with the unit-test.
  18. Stefan Neufeind uploaded patch set 5 06/17/13, 20:15

  19. Mr. Jenkins commented on patch set 5 06/17/13, 20:16

  20. Stefan Neufeind commented on patch set 5 V +2 CR +2 06/17/13, 20:16

    Just removed the newline I previously mentioned. Votes still apply. Works fine using a COA in the testcase here or in TypoScript using a PAGE-object (which functions kind of like a COA then).
  21. Stefan Neufeind merged patch set 6 06/17/13, 20:16