[BUGFIX] Fully initialize ContentObjectRenderer in HtmlViewHelper 38/53338/2
authorTorsten Schrade <schradt@uni-mainz.de>
Tue, 20 Jun 2017 04:53:49 +0000 (06:53 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 27 Jun 2017 16:37:46 +0000 (18:37 +0200)
Add a call to the start function of ContentObjectRenderer after
instantiation. This is necessary to get all hooks fully initialized.

Resolves: #81624
Resolves: #75314
Releases: master, 8.7, 7.6
Change-Id: I75d30e860cd77a1b233d4383a3e57afe9a34ec54
Reviewed-on: https://review.typo3.org/53338
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Torsten Schrade <schradt@uni-mainz.de>
Tested-by: Torsten Schrade <schradt@uni-mainz.de>
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlViewHelper.php

index dea409b..a39d8a8 100644 (file)
@@ -99,6 +99,7 @@ class HtmlViewHelper extends AbstractViewHelper implements CompilableInterface
         }
         $value = $renderChildrenClosure();
         $contentObject = GeneralUtility::makeInstance(ContentObjectRenderer::class);
         }
         $value = $renderChildrenClosure();
         $contentObject = GeneralUtility::makeInstance(ContentObjectRenderer::class);
+        $contentObject->start([]);
         $content = $contentObject->parseFunc($value, [], '< ' . $parseFuncTSPath);
         if (TYPO3_MODE === 'BE') {
             self::resetFrontendEnvironment();
         $content = $contentObject->parseFunc($value, [], '< ' . $parseFuncTSPath);
         if (TYPO3_MODE === 'BE') {
             self::resetFrontendEnvironment();