[!!!][BUGFIX] Content Object instances are reused 86/27586/7
authorOliver Hader <oliver@typo3.org>
Wed, 12 Feb 2014 16:38:04 +0000 (17:38 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Mon, 17 Feb 2014 14:58:03 +0000 (15:58 +0100)
commita25b6b921dbbf7d483b78273f751408c77f1c8b5
tree5b361a1244de89cf49846c8550c475e17e2ca632
parentdae88a2656e9480a6d4f0cc2d8b6c9a916e2101e
[!!!][BUGFIX] Content Object instances are reused

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.

Resolves: #55941
Releases: 6.2
Change-Id: I043a31403c05b87e1591f0e0237effa21bf93c98
Reviewed-on: https://review.typo3.org/27586
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php