[BUGFIX] Fix handling of additionalHeaderData in USER_INT
authorHelmut Hummel <helmut.hummel@typo3.org>
Mon, 29 Oct 2012 16:05:03 +0000 (17:05 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Mon, 29 Oct 2012 16:11:32 +0000 (17:11 +0100)
While introducing USER_INT handling for the pageRenderer
a bug has been introduced which breaks traditional usage of
additionalHeaderData and additionalFooterData.

This is the case because the replacement of the headerData is done
first, when the to be replaced strings are not present
in the HTML content.
They are stored in the pageRenderer context.

Because of that, we need to replace the pageRenderer marker first
and after that the marker for additionalHeaderData
and additionalFooterData

Fixes: #42490
Releases: 6.0

Change-Id: I91ef658b5b5c8ca5c6cf7e25752e59a33152c2ac
Reviewed-on: http://review.typo3.org/16013
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index 0271195..147a732 100644 (file)
@@ -3408,10 +3408,10 @@ class TypoScriptFrontendController {
                } while ($reprocess);
                $GLOBALS['TT']->push('Substitute header section');
                $this->INTincScript_loadJSCode();
+               $this->content = $this->getPageRenderer()->renderJavaScriptAndCssForProcessingOfUncachedContentObjects($this->content, $this->config['INTincScript_ext']['divKey']);
                $this->content = str_replace('<!--HD_' . $this->config['INTincScript_ext']['divKey'] . '-->', $this->convOutputCharset(implode(LF, $this->additionalHeaderData), 'HD'), $this->content);
                $this->content = str_replace('<!--FD_' . $this->config['INTincScript_ext']['divKey'] . '-->', $this->convOutputCharset(implode(LF, $this->additionalFooterData), 'FD'), $this->content);
                $this->content = str_replace('<!--TDS_' . $this->config['INTincScript_ext']['divKey'] . '-->', $this->convOutputCharset($this->divSection, 'TDS'), $this->content);
-               $this->content = $this->getPageRenderer()->renderJavaScriptAndCssForProcessingOfUncachedContentObjects($this->content, $this->config['INTincScript_ext']['divKey']);
                $this->setAbsRefPrefix();
                $GLOBALS['TT']->pull();
        }