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

Legacy pagelayout displayed inside twig pagelayout is bugged

    XMLWordPrintable

Details

    Description

      Embedding legacy output in twig pagelayout results in html and body tags being rendered twice

      Steps to reproduce
      • create a MyCcookbookBundle
      • add into parameters.yml

        ezpublish_legacy.default.module_default_layout: 'MyCookbookBundle::pagelayout.html.twig'

      • set pagelayout.html.twig as shown in Legacy template fallback
        <!DOCTYPE html>
        <!--[if lt IE 9 ]><html class="unsupported-ie ie" lang=""><![endif]-->
        <!--[if IE 9 ]><html class="ie ie9" lang=""><![endif]-->
        <!--[if (gt IE 9)|!(IE)]><!--><html lang=""><!--<![endif]-->
        <head>
            {# TODO: this probably won't be needed anymore as we will relay on the HTTP cache #}
            {% include 'eZDemoBundle::page_head_displaystyles.html.twig' with { 'user': user } %}
        
            <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        
            {% include 'eZDemoBundle::page_head.html.twig' %}
            {% include 'eZDemoBundle::page_head_style.html.twig' %}
            {% include 'eZDemoBundle::page_head_script.html.twig' %}
            <script>alert("beh");</script>
        </head>
        <body>
        {% block content %}
            {# module_result variable is received from the legacy controller. #}
            {# It holds the legacy module result #}
            {{ module_result.content|raw }}
        {% endblock %}
        </body>
        </html>
        
      • fetch user/login with curl (browsers might masquerade the results)
        curl http:<front-end-site>/user/login | grep body
        

        => Expected result: only one body tag should be present
        => Actual result: body tag will be opened and closed twice
        (denoting that the body tag is being rendered twice)

      Attachments

        Activity

          People

            Unassigned Unassigned
            joaquim.cavalleri-obsolete@ez.no Joaquim Cavalleri (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 36 minutes
                6h 36m