Project

General

Profile

Actions

Bug #57294

closed

pageRenderer was resetted after render call

Added by Stefan Froemken about 10 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2014-03-25
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

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


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #57920: PageRenderer do not unset() class membersClosed2014-04-15

Actions
Related to TYPO3 Core - Bug #58010: No backend login possible after Update 6.2.0 > 6.2.1ClosedMarkus Klein2014-04-17

Actions
Related to TYPO3 Core - Bug #60213: pageRenderer->addJsFooterFile doesn't work as expectedClosed2014-07-09

Actions
Actions #1

Updated by Gerrit Code Review about 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

Actions #2

Updated by Gerrit Code Review about 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

Actions #3

Updated by Gerrit Code Review about 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

Actions #4

Updated by Gerrit Code Review about 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

Actions #5

Updated by Gerrit Code Review about 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

Actions #6

Updated by Stefan Froemken about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Bernhard Kraft almost 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.

Actions #8

Updated by Mathias Schreiber over 8 years ago

  • Target version deleted (next-patchlevel)
Actions #9

Updated by Benni Mack over 3 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.

Actions

Also available in: Atom PDF