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

assign_display does not search extension folders for templates

    Details

      Description

      Hello,

      a tamplate put in ../ext/[name]/[ext_name]/styles/all/template/, e.g. ../ext/[name]/[ext_name]/styles/all/template/small_tag.html is not found when used for assign_display(...) in a listener:

      $this->template->assign_display('small_tag.html');

      Error:

      Fatal error: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template "small_tag.html" (looked into: ./styles/prosilver/template, ./styles/prosilver/theme).' in /.../phpbb31/vendor/twig/twig/lib/Twig/Loader/Filesystem.php on line 202
      ( ! ) Twig_Error_Loader: Unable to find template "small_tag.html" (looked into: ./styles/prosilver/template, ./styles/prosilver/theme). in /.../phpbb31/vendor/twig/twig/lib/Twig/Loader/Filesystem.php on line 202
      Call Stack
      #   Time   Memory   Function   Location
      1   0.0044   476256   {main}( )   ../viewforum.php:0
      2   0.6706   14907992   phpbb\event\dispatcher->trigger_event( )   ../viewforum.php:896
      3   0.6706   14908136   phpbb\event\dispatcher->dispatch( )   ../dispatcher.php:46
      4   0.6706   14908136   Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch( )   ../dispatcher.php:60
      5   0.6706   14908136   Symfony\Component\EventDispatcher\EventDispatcher->dispatch( )   ../ContainerAwareEventDispatcher.php:167
      6   0.6707   14908136   Symfony\Component\EventDispatcher\EventDispatcher->doDispatch( )   ../EventDispatcher.php:53
      7   0.6707   14908488   call_user_func ( )   ../EventDispatcher.php:164
      8   0.6707   14908520   robertheim\topictags\event\main_listener->viewforum_modify_topicrow( )   ../EventDispatcher.php:164
      9   0.6767   15138016   phpbb\template\twig\twig->assign_display( )   ../main_listener.php:341
      10   0.6776   15173320   Twig_Environment->render( )   ../twig.php:350
      11   0.6776   15173424   phpbb\template\twig\environment->loadTemplate( )   ../Environment.php:288
      
      

      As you can see, the ext. folders are not used for search here.

      This works as a workaround:

      $this->template->assign_display('./../../../ext/[name]/[ex_name]/styles/all/template/small_tag.html');

        Attachments

          Activity

            People

            • Assignee:
              nicofuma nicofuma
              Reporter:
              combuster combuster
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: