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

TWIG breaks template events for events inside of looped template code

XMLWordPrintable

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

      I don't think the core has any template events inside of block_var_array outputs, but I was working on an extension, and had a temporary template event of my own for testing purposes that did, and it has been broken by TWIG.

      So if you have a template event set up in a core template such as:

      <!-- BEGIN topicrow -->
      	<li>
      		<dl>....lots of stuff from the core template file...</dl>
      		<!-- EVENT foo_bar -->
      	</li>
      <!-- END topicrow -->
      

      And your template event file "foo_bar.html" has the following:

      <!-- IF topicrow.TOPIC_TITLE -->
      	<strong>{topicrow.TOPIC_TITLE}</strong>
      <!-- ENDIF -->

      Nothing gets injected into your template. TWIG seems to get confused by the looping "topicrow" variable. It does not correctly acquire topicrow.TOPIC_TITLE and so injects null.

            EXreaction EXreaction [X] (Inactive)
            VSE Matt Friedman [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: