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

        Show
        Jérôme Vieilledent (Inactive) added a comment - Fixed in master: https://github.com/ezsystems/ezpublish-kernel/commit/5dafdc4d61b7da9c3dfc5eb204a7ec9b2aca393b
        Show
        Jérôme Vieilledent (Inactive) added a comment - Pull-request : https://github.com/ezsystems/ezpublish-kernel/pull/297

          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