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

        Matthieu Sévère created issue -
        Jérôme Vieilledent (Inactive) made changes -
        Field Original Value New Value
        Status Open [ 1 ] Backlog [ 10000 ]
        Jérôme Vieilledent (Inactive) made changes -
        Labels ezpublish5 ezpublish5 legacy
        Affects Version/s Engineering tracked issues [ 11179 ]
        Affects Version/s Known Issues 5.x Stack [ 11285 ]
        Priority High [ 3 ] Critical [ 2 ]
        Jérôme Vieilledent (Inactive) logged work - 15/Apr/13 3:42 PM - edited
        Jérôme Vieilledent (Inactive) made changes -
        Status Backlog [ 10000 ] Development [ 3 ]
        Assignee Jerome Vieilledent [ jerome.vieilledent@ez.no ]
        Show
        Jérôme Vieilledent (Inactive) added a comment - Pull-request : https://github.com/ezsystems/ezpublish-kernel/pull/297
        Jérôme Vieilledent (Inactive) made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 1 hour [ 3600 ]
        Worklog Id 32421 [ 32421 ]
        Jérôme Vieilledent (Inactive) made changes -
        Status Development [ 3 ] Devlopment done [ 5 ]
        Jérôme Vieilledent (Inactive) made changes -
        Original Estimate 0 minutes [ 0 ]
        Priority Critical [ 2 ] Blocker [ 1 ]
        Jérôme Vieilledent (Inactive) made changes -
        Summary When including a legacy template in a twig template, fetch functions doesn't work When including a legacy template in a twig template, fetch functions don't work
        Fix Version/s Engineering tracked issues [ 11179 ]
        Fix Version/s 5.1.0rc1 [ 11780 ]
        Affects Version/s 5.0 [ 10300 ]
        Affects Version/s 5.1.0beta1 [ 11779 ]
        Affects Version/s Engineering tracked issues [ 11179 ]
        Affects Version/s 5.1 [ 11280 ]
        Show
        Jérôme Vieilledent (Inactive) added a comment - Fixed in master: https://github.com/ezsystems/ezpublish-kernel/commit/5dafdc4d61b7da9c3dfc5eb204a7ec9b2aca393b
        Jérôme Vieilledent (Inactive) made changes -
        Time Spent 1 hour [ 3600 ] 2 hours [ 7200 ]
        Worklog Id 32451 [ 32451 ]
        Jérôme Vieilledent (Inactive) made changes -
        Status Devlopment done [ 5 ] Documentation done [ 10011 ]
        Jérôme Vieilledent (Inactive) made changes -
        Time Spent 2 hours [ 7200 ] 3 hours [ 10800 ]
        Worklog Id 32421 [ 32421 ]
        Pedro Resende (Inactive) made changes -
        Status Documentation done [ 10011 ] QA [ 10008 ]
        Assignee Jerome Vieilledent [ jerome.vieilledent@ez.no ] Pedro Resende [ pedro.resende@ez.no ]
        Pedro Resende (Inactive) made changes -
        Rank Ranked higher
        Pedro Resende (Inactive) made changes -
        Time Spent 3 hours [ 10800 ] 5 hours [ 18000 ]
        Worklog Id 32867 [ 32867 ]
        Pedro Resende (Inactive) made changes -
        Time Spent 5 hours [ 18000 ] 6 hours [ 21600 ]
        Worklog Id 32867 [ 32867 ]
        Pedro Resende (Inactive) made changes -
        Status QA [ 10008 ] QA done [ 10007 ]
        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

        André Rømcke made changes -
        Assignee Pedro Resende [ pedro.resende@ez.no ]
        Status QA done [ 10007 ] Closed [ 6 ]
        Fix Version/s 5.0-SP [ 11287 ]
        Fix Version/s 5.1 [ 11280 ]
        Fix Version/s 5.1.0rc1 [ 11780 ]
        Resolution Fixed [ 1 ]
        André Rømcke made changes -
        Workflow eZ Engineering Scrumban Workflow [ 53171 ] EZ* Development Workflow [ 83692 ]
        Alex Schuster made changes -
        Workflow EZ* Development Workflow [ 83692 ] EZEE Development Workflow [ 122306 ]
        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