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

    XMLWordPrintable

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/

      Attachments

        Activity

          People

            Unassigned Unassigned
            1f3baf94-5904-4b87-8341-a99f2d4328d8@accounts.ibexa.co 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