Issue Bug Closed

#57294pageRenderer was resetted after render call

Stefan Froemken 03/25/14, 15:53 updated 08/06/20, 11:01

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

Reviews 3