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

Overriding template with section_identifier fails when cached

    Details

      Description

      If a template is declared to override using the match by section_identifier, and the view cache is enabled, the cached versions will fall back to default templates and ignore the overrides.

      test case:
      1 - setting up the environment

      • enable debug and list templates options in admin
      • create a section called "test" (name and identifier)
      • create a folder X, set the section to "test"
      • assign anonymous user permissions to read section "test"
      • open X in frontend
      • check the full path of the "pagelayout.tpl" used, to override it. it will depend on the extension used to generate the frontend (ezflow, ezdemo, etc)

      2 - making the override

      • edit the "pagelayout.tpl" file with some change, save it at the path <extension>/overrides/templates/modified_pagelayout.tpl
      • add to the default frontend siteaccess settings/override.ini.append.php:

          [pagelayout_section_test]
          Source=pagelayout.tpl
          MatchFile=modified_pagelayout.tpl
          Subdir=templates
          Match[section_identifier]=test
        

      • clear all caches
      • open X in frontend. the modified_pagelayout.tpl is used, at bottom of debug it can be checked the correct usage.
      • reload the page, view falls back to default template. the debug at bottom shows that none of the templates are overriden.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Paulo Bras (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: