Bug #57294
closedpageRenderer was resetted after render call
100%
Description
Hello Core-Team,
I found following lines in DocumentTemplate.php:
$str = $this->pageRenderer->render(PageRenderer::PART_HEADER); $this->JScodeLibArray = array(); $this->JScode = ($this->extJScode = ''); $this->JScodeArray = array(); $this->endOfPageJsBlock = $this->pageRenderer->render(PageRenderer::PART_FOOTER);
As you can see pageRenderer->render was called two times with different arguments.
But in pageRenderer->render you call $this->reset();
So...second call for Footer has no data to render.
$this->reset() was called from __constructor(). So in my opinion we should remove this line.
Stefan
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28770
Updated by Gerrit Code Review over 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28770
Updated by Gerrit Code Review over 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28770
Updated by Gerrit Code Review over 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28770
Updated by Gerrit Code Review over 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28770
Updated by Stefan Froemken over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c67e8ebbb074c46dae40bec329db7392e023b0d6.
Updated by Bernhard Kraft over 10 years ago
- Status changed from Resolved to Accepted
- Target version changed from 6.2.0 to next-patchlevel
The latest patch got reverted so this issue still exists.
Updated by Mathias Schreiber about 9 years ago
- Target version deleted (
next-patchlevel)
Updated by Benni Mack over 4 years ago
- Status changed from Accepted to Closed
Hey everybody,
this change was finally possible to be fixed in v11:
- DocumentTemplate is not in use anymore
- ModuleTemplate only uses one call $this->pageRenderer->render()
Unfortunately, this change was too complex to be backported to a LTS version, as others mentioned that they relied on this behavior to add code in their extensions.
I strongly recommend to use the AssetCollector API via Fluid ViewHelpers to add CSS/JS for Backend and Frontend (starting in v10) as this state is not reseted intentionally.
If you feel otherwise or have another solution for v10, let me know so I can re-open the issue.