Issue Bug Closed

#79045getTemplatePathAndFilename() in \TYPO3\CMS\Fluid\View\StandaloneView calls a non existing method

Daniel Gohlke 12/20/16, 12:14 updated 10/17/17, 23:24

Description

The method getTemplatePathAndFilename() in \TYPO3\CMS\Fluid\View\StandaloneView calls getTemplatePathAndFilename() on the TemplatePath. But this method doesn’t exist neither in \TYPO3\CMS\Fluid\View\TemplatePaths nor in \TYPO3Fluid\Fluid\View\TemplatePaths

    /**
     * Returns the absolute path to a Fluid template file if it was specified with setTemplatePathAndFilename() before
     *
     * @return string Fluid template path
     * @api
     */
    public function getTemplatePathAndFilename()
    {
        return $this->baseRenderingContext->getTemplatePaths()->getTemplatePathAndFilename();
    }

I had a conversation with Claus on Slack. He don’t wan’t to reimplement this method in \TYPO3Fluid\Fluid\View\TemplatePaths. He also will deprecate the setTemplatePathAndFilename() method there.

I think there are two solutions:
  1. reimplement the getter-method in \TYPO3\CMS\Fluid\View\TemplatePaths
  2. remove the getter in \TYPO3\CMS\Fluid\View\StandaloneView

The second solution will be a breaking change in TYPO3 v8.

We should find a solution for that and mark both (getTemplatePathAndFilename() and setTemplatePathAndFilename()) as deprecated.

Reviews 2