Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-20698

When including a legacy template in a twig template, fetch functions don't work

    Details

      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/

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Backlog Backlog
        3m 41s 1 jerome.vieilledent@ez.no 15/Apr/13 2:26 PM
        Backlog Backlog Development Development
        1h 16m 1 jerome.vieilledent@ez.no 15/Apr/13 3:42 PM
        Development Development Development Done Development Done
        17s 1 jerome.vieilledent@ez.no 15/Apr/13 3:42 PM
        Development Done Development Done Documentation Review done Documentation Review done
        6h 39m 1 jerome.vieilledent@ez.no 15/Apr/13 10:22 PM
        Documentation Review done Documentation Review done QA QA
        3d 14h 41m 1 pedro.resende@ez.no 19/Apr/13 1:04 PM
        QA QA QA Done QA Done
        4d 3h 35m 1 pedro.resende@ez.no 23/Apr/13 4:39 PM
        QA Done QA Done Closed Closed
        3d 1h 54m 1 André Rømcke 26/Apr/13 6:34 PM

          People

          • Assignee:
            Unassigned
            Reporter:
            Matthieu Sévère
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0 minutes
              0m
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 6 hours
              6h