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

TWIG breaks template events for events inside of looped template code

    XMLWordPrintable

    Details

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: