Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-11777

Extension template events are not loaded from subdirectories

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.1.0-a1
    • 3.1.0-dev
    • Template Engine
    • None

      In writing template event listeners for extensions so far, it has been the habit to place the files in the styles/[style]/template/events/ directory. Since the switch to twig as a template engine, however, template event listeners placed in this directory do not work anymore. They have to be placed directly in styles/[style]/template/.

      Now, the old template engine searched all subdirectories recursively for template event files. This is probably not needed; in order to match the behavior of php event listeners, just searching styles/[style]/template/event/ for files ending in _listener.html is enough. I therefore propose to add 'event/' to the template event listener search path so it will only scan that subdirectory, and a '_listener' suffix to the location to pick up files in the same manner as with php event listeners.

            nickvergessen Joas Schilling
            rechosen rechosen [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: