Project

General

Profile

Actions

Bug #78326

closed

Fatal error: Call to a member function getViewHelper() on a non-object in template cache file

Added by Bill Dagou over 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2016-10-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When using nested fluid in <f:layout> in a fluid template, like

<f:layout name="{f:cObject(typoscriptObjectPath: 'lib.layout')}" />

the cache file would get fatal error when parsing the layout name in line 178 in \TYPO3\CMS\Fluid\View\AbstractTemplateView::render(), because $self is not defined in the cache file.

After a few research, adding

\$self = \$this;

before line 98 in \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler would get the error fixed, and the nexted fluid would be rendered correctly.

Actions

Also available in: Atom PDF