Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
5.0, 5.1.0beta1
Description
When including a legacy template in a twig template, fetch functions doesn't work.
Example : {% include "design:parts/website_toolbar.tpl" with
{"current_node_id": location.contentInfo.id}%}
The legacy stack return following errors :
eZModuleFunctionInfo::loadDefinition:Missing function definition file for module: content
eZFunctionHandler::execute:Cannot execute function 'node' in module 'content', no valid data
This is because the method loadDefinition() in lib/ezutils/classes/ezmodulefunctioninfo.php call : file_exists( $path . '/' . $this->ModuleName . '/function_definition.php' ); it is always false because we are in the web directory and the file is located at "../ezpublish_legacy" . $path . '/' . $this->ModuleName . '/function_definition.php'
Symlinking the kernel directory into the web one solves the problem.
See forum discussion : http://share.ez.no/forums/ez-publish-5-platform/include-legacy-templates/