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

Wrong default value to noLayout view parameter

    XMLWordPrintable

Details

    Description

      Prior to v6.0, ViewController::viewLocation() and ViewController::viewContent() had parameter $layout default value to false. The consequence was that noLayout parameter, injected further down in templates, had true as default value (the exact opposite).

      The goal of such parameter was to ensure that templates used in subrequests always had the information not to use the main pagelayout by default, especially when rendering content from legacy (templates not migrated yet to Twig).

      We could also do stuff like the following:

      {% extends noLayout == true ? viewbaseLayout : pagelayout %}
      

      Problem with the value injected by NoLayout injector is that the default value of noLayout parameter changed. It currently checks if layout parameter is present (which is not the case by default with the new view system) and if not, defaults to false.

      Consequence is that when migrating an instance from eZ Publish 5 to Platform with legacy bridge, main layout is always used, causing an infinite loop in case of subrequests for which content is rendered through legacy bridge. This sounds like an undocumented BC break to me .

      Attachments

        Activity

          People

            Unassigned Unassigned
            9e9f2c72-d8ff-4ec0-b8df-c5a744234b9a@accounts.ibexa.co Jérôme Vieilledent
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: