Issue Bug Closed

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

Bill Dagou 10/18/16, 10:57 updated 10/02/18, 11:06

Description

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

<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.

Reviews 2