Review main Merged Breaking

27586[!!!][BUGFIX] Content Object instances are reused

Oliver Hader CR +2 V +2 Normal +47 −105 updated 02/17/14, 14:58

Commit message

The ContentObjectRenderer creates instances for each content
object to be rendered, e.g. TEXT, COA, CONTENT, etc. However,
these instances are re-used and therefore we introduced work
arounds since serialization of FLUIDTEMPLATE failed back then.
If dealing with nested record sets using RECORDS or CONTENT,
reusing objects might be tricky since the parent pointer to the
ContentObjectRenderer might be wrong and strange things happen.

This patch removes the pseudo singleton approach since the
objects are not state-less and might lead to unexpected
results in rare cases.

Review

  • Code review CR +2
    • Helmut Hummel +2
    • Stefan Neufeind +1
    • Markus Klein +1
  • Verified V +2
    • Helmut Hummel +2
    • Stefan Neufeind +1
    • Markus Klein +1

Issues 1

Files 2

Review log 26

Show 1 earlier messages
  1. Mr. Jenkins commented on patch set 1 02/12/14, 17:18

  1. Markus Klein commented on patch set 1 02/12/14, 17:20

    ContentObjectRenderer.php:782

    isset check missing.
  2. Helmut Hummel voted on patch set 1 CR +1 02/12/14, 19:03

  3. Oliver Hader commented on patch set 1 02/13/14, 09:30

    ContentObjectRenderer.php:782 Reply

    Was not there before, but you're right... I'll add it
  4. Oliver Hader uploaded patch set 2 02/13/14, 09:42

  5. Mr. Jenkins commented on patch set 2 02/13/14, 10:29

  6. Oliver Hader uploaded patch set 3 02/13/14, 10:43

  7. Mr. Jenkins commented on patch set 3 02/13/14, 11:28

  8. Markus Klein voted on patch set 3 CR +1 02/13/14, 12:09

  9. Oliver Hader uploaded patch set 4 02/14/14, 16:36

  10. Markus Klein voted on patch set 4 CR +1 02/14/14, 17:01

  11. Mr. Jenkins commented on patch set 4 02/14/14, 17:29

  12. Helmut Hummel commented on patch set 4 V -1 CR +1 02/14/14, 17:33

    Unit tests need adaption!
  13. Helmut Hummel commented on patch set 4 02/14/14, 17:34

    or better: removal of according tests...
  14. Helmut Hummel uploaded patch set 5 02/14/14, 17:37

  15. Helmut Hummel voted on patch set 5 V +1 CR +2 02/14/14, 17:37

  16. Mr. Jenkins commented on patch set 5 02/14/14, 18:10

  17. Christian Kuhn commented on patch set 5 CR +1 02/14/14, 18:30

    oh yeah :)
  18. Helmut Hummel commented on patch set 5 02/14/14, 20:07

    ContentObjectRenderer.php:785

    Maybe we can even skip the class_exists here as we can be pretty sure that the class exists because the mapping is quite fixed. before there was no isset and therefore the class_exists was needed to avoid a fatal
  19. Stefan Neufeind voted on patch set 5 CR +1 02/16/14, 16:59

  20. Markus Klein uploaded patch set 6 02/17/14, 12:49

  21. Markus Klein commented on patch set 6 V +1 CR +1 02/17/14, 12:50

    Removed the class_exists(). No way this could fail without having a corrupted Core.
  22. Mr. Jenkins commented on patch set 6 02/17/14, 13:12

  23. Stefan Neufeind commented on patch set 6 V +1 CR +1 02/17/14, 14:06

    Fine by reading and tests still run fine.
  24. Helmut Hummel commented on patch set 6 V +2 CR +2 02/17/14, 14:58

    Thanks for the updates and the reviews!
  25. Helmut Hummel merged patch set 7 02/17/14, 14:58