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

Double layout using legacy /layout/set module and LegacyKernelController

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.3.8, 5.4.6
    • Fix Version/s: Customer request, 5.4.8
    • Component/s: Legacy bridge
    • Labels:
      None

      Description

      Hi

      When using /layout/set legacy module through LegacyKernelController having a module layout configured, result from legacy kernel is rendered using this module layout.
      However, when using /layout/set, you already define a layout in legacy stack (via layout.ini. Problem is that the result from /layout/set will be embedded in the configured module layout, which can give very unexpected results.
      Best example is that when you want to render XML, JSON or anything not HTML, you'll have the result embedded in some HTML layout.

      Example

      Module layout configuration

      With the following config, AcmeLegacyTestBudle::pagelayout_legacy.html.twig will be used for rendering result from legacy modules.

      ez_publish_legacy:
          system:
              my_site:
                  templating:
                      view_layout: "AcmeLegacyTestBundle::pagelayout.html.twig"
                      module_layout: "AcmeLegacyTestBudle::pagelayout_legacy.html.twig"
      

      layout.ini (legacy kernel)

      [css]
      PageLayout=plainlayout.tpl
      ContentType=text/css
      

      With this config, you expect that plainlayout.tpl will be used (goal is to render CSS code obviously), using text/css content type.

      Problem

      When calling /layout/set/css/content/view/css/1234, content will be:

      • rendered using plainlayout.tpl by legacy kernel => OK
      • rendered using AcmeLegacyTestBudle::pagelayout_legacy.html.twig by LegacyKernelController => Not OK as this layout contains HTML code.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              lolautruche Jérôme Vieilledent
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: