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

        Jérôme Vieilledent (Inactive) logged work - 15/Apr/13 3:42 PM - edited
        Pedro Resende (Inactive) logged work - 23/Apr/13 5:38 PM - edited
        • Time Spent:
          3 hours
           

          Analyse and reproduce issue, write test case and verify the issue has been fixed

          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