Review main Merged

28770[BUGFIX] Do not reset Page Renderer on partial rendering

Stefan Froemken CR +2 V +2 Normal +54 −2 updated 04/20/14, 10:17

Commit message

Currently the Page Renderer is reset when calling
the render() method, even if only one part (header
or footer) is rendered, which causes a second call
to fail, when rendering another part.
This happens e.g in DocumentTemplate.php where
the render() method is called two times. Because of
the reset, the second call starts pageRenderer with
empty properties.

Solution is to only call reset if everything is rendered.

Review

  • Code review CR +2
    • Stefan Neufeind +2
    • Nicole Hummel +1
  • Verified V +2
    • Stefan Neufeind +2
    • Nicole Hummel +1

Issues 1

Files 2

Review log 29

Show 4 earlier messages
  1. Mr. Jenkins commented on patch set 1 03/25/14, 15:28

  2. Helmut Hummel uploaded patch set 2 03/26/14, 11:48

  3. Helmut Hummel commented on patch set 2 CR -1 03/26/14, 11:50

    I would not remove this completely, but reset it only when everything is rendered. This fact needs to be added tho the functional tests (not added yet) -1 until functional tests are added, other than that, the change looks good now.
  4. Mr. Jenkins commented on patch set 2 03/26/14, 12:01

  1. Nicole Hummel commented on patch set 2 04/01/14, 18:51

    PageRenderer.php:1954

    why do we need a reset anyway?
  2. Nicole Hummel uploaded patch set 3 04/01/14, 19:47

  3. Mr. Jenkins commented on patch set 3 04/01/14, 20:01

  4. Markus Klein voted on patch set 3 V +1 CR +1 04/02/14, 13:58

  5. Christian Kuhn commented on patch set 3 04/03/14, 00:08

    Expressing my gut feeling: A change in this area is not easy, at first glance it may have impact that is not easily forseseen, eg on user_int, or maybe nested user_ints and stuff like that. Regressions in this area are always hard to track and easily cost users hours of debugging with a high frustration level. I don't want to block here and just ask for additional cautiousness before merge. Please be careful.
  6. Christian Kuhn commented on patch set 3 04/03/14, 00:16

    otoh, maybe i'm wrong and this change is easy. at the moment i do not really assess its impact.
  7. Markus Klein commented on patch set 3 04/03/14, 10:23

    @Christian: I fully agree with you. I actually voted here, since https://review.typo3.org/28893 depends on this.
  8. Helmut Hummel commented on patch set 3 04/03/14, 16:02

    @Christian: That is exactly why this change requires a functional test. This test should test the expectation we have currently. In case this breaks something (I don't thinks so currently), then we need to add more tests for these regressions in order to finally get all cases covered.
  9. Helmut Hummel uploaded patch set 4 04/03/14, 16:36

  10. Helmut Hummel commented on patch set 4 V +1 CR +1 04/03/14, 16:36

    Added functional tests for that one
  11. Mr. Jenkins commented on patch set 4 04/03/14, 16:49

  12. Nicole Hummel commented on patch set 4 04/03/14, 18:52

    PageRendererTest.php:210

    Do we really need both variables each time just to set the string?
  13. Nicole Hummel voted on patch set 4 V +1 CR +1 04/03/14, 18:58

  14. Stefan Neufeind commented on patch set 4 V +1 CR +1 04/03/14, 19:07

    PageRendererTest.php:210 Reply

    We can of course get rid of one variable. I don't really mind though. Adjust if you like, please.
  15. Nicole Hummel uploaded patch set 5 04/03/14, 19:48

  16. Nicole Hummel commented on patch set 5 V +1 CR +1 04/03/14, 19:48

    Removed flawless variables in functional test
  17. Nicole Hummel commented on patch set 5 04/03/14, 19:49

    flawless = superfluous
  18. Stefan Neufeind commented on patch set 5 V +2 CR +2 04/03/14, 20:00

    Just minor adjustments in the test as Nicole discussed with Helmut. So Helmut's votes +1/+1 also still count here.
  19. Stefan Neufeind merged patch set 6 04/03/14, 20:00

  20. Mr. Jenkins commented on patch set 5 04/03/14, 20:00

  21. Markus Klein commented on patch set 6 04/14/14, 23:42

    PageRenderer.php:1951

    Post -1. This causes gridelements to fail in BE (any module). Obviously the pageRenderer is reused somehow and fails then as some internal members are NULL. http://forge.typo3.org/issues/57919 (Bad code design where unset() is called on class members.)
  22. Markus Klein commented on patch set 6 04/14/14, 23:51

  23. Stefan Neufeind commented on patch set 6 04/14/14, 23:54

    done, thanks
  24. Markus Klein commented on patch set 6 04/19/14, 15:12

  25. Helmut Hummel commented on patch set 6 04/20/14, 10:17

    Reverted This patchset was reverted in change: I9e489e49f65bb69e2f3c3b997cc14465d6a08d80