Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-11622

Template events are loaded incorrectly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev
    • Fix Version/s: 3.1.0-a1
    • Component/s: Template Engine
    • Labels:
      None

      Description

      After going through the template events test for my Twig branch, I realized they were designed incorrectly.

      Only ONE template event file is supposed to be included from EACH
      extension. As it was before, EVERY matching template event file from
      each extension was included (this was how it was designed).

      E.g.
      Event call in prosilver "foo"
      Extension has template "foo" in prosilver AND all

      foo from all would be included, then foo from prosilver would be included

      This was clearly not designed correctly as only the most specific event
      file from each extension should be loaded, otherwise events could only
      ever be put in a single style tree (either only all, or only prosilver
      and subsilver2 and any style that inherits from neither of those).
      Otherwise the events would be duplicated on output (which is clearly not
      desirable).

      This is fixed with the Twig PR, but should be noted in case something would happen that we cannot use Twig (which is unlikely).

        Issue Links

          Activity

          Hide
          nickvergessen Joas Schilling added a comment -

          note:
          Currently you can have a/foo and b/foo (so two listeners in 2 different sub-folders and both get included.
          I like this feature, if we are able to keep that.

          This means, if a/foo exists in both, pro and all, pro gets included, if b/foo only exists in all, we would then load prosilver/a/foo and all/b/foo

          Show
          nickvergessen Joas Schilling added a comment - note: Currently you can have a/foo and b/foo (so two listeners in 2 different sub-folders and both get included. I like this feature, if we are able to keep that. This means, if a/foo exists in both, pro and all, pro gets included, if b/foo only exists in all, we would then load prosilver/a/foo and all/b/foo
          Hide
          EXreaction EXreaction [X] (Inactive) added a comment -

          That isn't documented functionality. It probably could be done, but that would require we go back to using the finder for template events, which is (probably) less efficient.

          I would prefer to address that in another ticket (it needs additional tests).

          Show
          EXreaction EXreaction [X] (Inactive) added a comment - That isn't documented functionality. It probably could be done, but that would require we go back to using the finder for template events, which is (probably) less efficient. I would prefer to address that in another ticket (it needs additional tests).

            People

            • Assignee:
              EXreaction EXreaction [X] (Inactive)
              Reporter:
              EXreaction EXreaction [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development