ZF3 PhpRenderer not finding template path












1















I know there are dozen of questions about PHPRenderer not finding the path of a template, but I think the problem is quite different here.



First, the goal is to render a view to a variable in order to send it to a PDF Renderer (I use ZF3 TCPDF module). If there is any better way to do that, please tell me.



Here is roughly the architecture of the project: https://imgur.com/UhQ7hgP



In AlertAction() of ToolsController, I return the view like this, and it works, which make me think the template path is alright.



$view = new ViewModel();
$view->setTemplate('tools/tools/alert');
return $view;


However, when I try to render the same view with the same path in exportPDFAction(), it does not work and gives the following error.




ZendViewRendererPhpRenderer::render: Unable to render template "tools/tools/alert"; resolver could not resolve to a file




The code in exportPDFAction() is:



$view = new ViewModel();
$renderer = new PhpRenderer();
$view->setTemplate('tools/tools/alert');
$html = $renderer->render($view);


I assume the last line screws it as it is the difference, but I can't get why, does anyone have any clue ?



Quite all the topics about Template path on SO were talking about the template map in module.config.php, but I think this is not the problem here since it works perfectly in AlertAction().



EDIT



The PhpRenderer is injected in the controller directly in module.config.php:



'controllers' => [
'factories' => [
ToolsController::class => function($container) {
return new ToolsController(
$container->get(Adapter::class),
$container->get(TCPDF::class),
$container->get(PhpRenderer::class)
);
},
],
],


EDIT 2



This is the controller constructor:



public function __construct($db, $tcpdf, $renderer)
{
$this->db = $db;
$this->tcpdf = $tcpdf;
$this->renderer = $renderer;
...
}









share|improve this question





























    1















    I know there are dozen of questions about PHPRenderer not finding the path of a template, but I think the problem is quite different here.



    First, the goal is to render a view to a variable in order to send it to a PDF Renderer (I use ZF3 TCPDF module). If there is any better way to do that, please tell me.



    Here is roughly the architecture of the project: https://imgur.com/UhQ7hgP



    In AlertAction() of ToolsController, I return the view like this, and it works, which make me think the template path is alright.



    $view = new ViewModel();
    $view->setTemplate('tools/tools/alert');
    return $view;


    However, when I try to render the same view with the same path in exportPDFAction(), it does not work and gives the following error.




    ZendViewRendererPhpRenderer::render: Unable to render template "tools/tools/alert"; resolver could not resolve to a file




    The code in exportPDFAction() is:



    $view = new ViewModel();
    $renderer = new PhpRenderer();
    $view->setTemplate('tools/tools/alert');
    $html = $renderer->render($view);


    I assume the last line screws it as it is the difference, but I can't get why, does anyone have any clue ?



    Quite all the topics about Template path on SO were talking about the template map in module.config.php, but I think this is not the problem here since it works perfectly in AlertAction().



    EDIT



    The PhpRenderer is injected in the controller directly in module.config.php:



    'controllers' => [
    'factories' => [
    ToolsController::class => function($container) {
    return new ToolsController(
    $container->get(Adapter::class),
    $container->get(TCPDF::class),
    $container->get(PhpRenderer::class)
    );
    },
    ],
    ],


    EDIT 2



    This is the controller constructor:



    public function __construct($db, $tcpdf, $renderer)
    {
    $this->db = $db;
    $this->tcpdf = $tcpdf;
    $this->renderer = $renderer;
    ...
    }









    share|improve this question



























      1












      1








      1








      I know there are dozen of questions about PHPRenderer not finding the path of a template, but I think the problem is quite different here.



      First, the goal is to render a view to a variable in order to send it to a PDF Renderer (I use ZF3 TCPDF module). If there is any better way to do that, please tell me.



      Here is roughly the architecture of the project: https://imgur.com/UhQ7hgP



      In AlertAction() of ToolsController, I return the view like this, and it works, which make me think the template path is alright.



      $view = new ViewModel();
      $view->setTemplate('tools/tools/alert');
      return $view;


      However, when I try to render the same view with the same path in exportPDFAction(), it does not work and gives the following error.




      ZendViewRendererPhpRenderer::render: Unable to render template "tools/tools/alert"; resolver could not resolve to a file




      The code in exportPDFAction() is:



      $view = new ViewModel();
      $renderer = new PhpRenderer();
      $view->setTemplate('tools/tools/alert');
      $html = $renderer->render($view);


      I assume the last line screws it as it is the difference, but I can't get why, does anyone have any clue ?



      Quite all the topics about Template path on SO were talking about the template map in module.config.php, but I think this is not the problem here since it works perfectly in AlertAction().



      EDIT



      The PhpRenderer is injected in the controller directly in module.config.php:



      'controllers' => [
      'factories' => [
      ToolsController::class => function($container) {
      return new ToolsController(
      $container->get(Adapter::class),
      $container->get(TCPDF::class),
      $container->get(PhpRenderer::class)
      );
      },
      ],
      ],


      EDIT 2



      This is the controller constructor:



      public function __construct($db, $tcpdf, $renderer)
      {
      $this->db = $db;
      $this->tcpdf = $tcpdf;
      $this->renderer = $renderer;
      ...
      }









      share|improve this question
















      I know there are dozen of questions about PHPRenderer not finding the path of a template, but I think the problem is quite different here.



      First, the goal is to render a view to a variable in order to send it to a PDF Renderer (I use ZF3 TCPDF module). If there is any better way to do that, please tell me.



      Here is roughly the architecture of the project: https://imgur.com/UhQ7hgP



      In AlertAction() of ToolsController, I return the view like this, and it works, which make me think the template path is alright.



      $view = new ViewModel();
      $view->setTemplate('tools/tools/alert');
      return $view;


      However, when I try to render the same view with the same path in exportPDFAction(), it does not work and gives the following error.




      ZendViewRendererPhpRenderer::render: Unable to render template "tools/tools/alert"; resolver could not resolve to a file




      The code in exportPDFAction() is:



      $view = new ViewModel();
      $renderer = new PhpRenderer();
      $view->setTemplate('tools/tools/alert');
      $html = $renderer->render($view);


      I assume the last line screws it as it is the difference, but I can't get why, does anyone have any clue ?



      Quite all the topics about Template path on SO were talking about the template map in module.config.php, but I think this is not the problem here since it works perfectly in AlertAction().



      EDIT



      The PhpRenderer is injected in the controller directly in module.config.php:



      'controllers' => [
      'factories' => [
      ToolsController::class => function($container) {
      return new ToolsController(
      $container->get(Adapter::class),
      $container->get(TCPDF::class),
      $container->get(PhpRenderer::class)
      );
      },
      ],
      ],


      EDIT 2



      This is the controller constructor:



      public function __construct($db, $tcpdf, $renderer)
      {
      $this->db = $db;
      $this->tcpdf = $tcpdf;
      $this->renderer = $renderer;
      ...
      }






      php templates zend-framework zend-framework3






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 '18 at 12:02







      JR2

















      asked Nov 22 '18 at 8:14









      JR2JR2

      83




      83
























          1 Answer
          1






          active

          oldest

          votes


















          2














          The error you're getting might be due to the fact your Renderer is not injected via the Factory.



          Try:



          class MyCustomControllerFactory implements FactoryInterface
          {
          public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
          {
          /** @var ZendViewRendererPhpRenderer $renderer */
          $renderer = $container->get('ViewRenderer')

          return new MyCustomController($renderer);
          }
          }


          In the Controller, require it be set in the __construct() function:



          public function __construct(PhpRenderer $renderer)
          {
          // ... set it somewhere, e.g.:
          $this->setRenderer($renderer);
          }


          Then use it in your function:



          $view = new ViewModel();
          $renderer = $this->getRenderer();
          $view->setTemplate('tools/tools/alert');
          $html = $renderer->render($view);




          Why, you ask?



          Because the Renderer is configured via the Zend Configuration. You can find that in the ZendMvcServiceServiceManageFactory class. The alias configuration provided is the following:



          'ViewPhpRenderer'                      => 'ZendViewRendererPhpRenderer',
          'ViewRenderer' => 'ZendViewRendererPhpRenderer',
          'ZendViewRendererRendererInterface' => 'ZendViewRendererPhpRenderer',


          The alias'es are mapped to Factory:



          'ZendViewRendererPhpRenderer' => ViewPhpRendererFactory::class,


          That Factory is:



          class ViewPhpRendererFactory implements FactoryInterface
          {
          /**
          * @param ContainerInterface $container
          * @param string $name
          * @param null|array $options
          * @return PhpRenderer
          */
          public function __invoke(ContainerInterface $container, $name, array $options = null)
          {
          $renderer = new PhpRenderer();
          $renderer->setHelperPluginManager($container->get('ViewHelperManager'));
          $renderer->setResolver($container->get('ViewResolver'));

          return $renderer;
          }
          }


          As such, it has some presets included when you use it with $this->getRenderer, namely it has the HelperPluginManager and the Resolver set. So it knows where to get additional resources (if needed) and it knows how to resolve (ie render) a View.






          share|improve this answer
























          • Actually it is, I forgot to include this part to the post (see the edit). But I need to add the configuration of phprenderer you mentionned in the second part ?

            – JR2
            Nov 22 '18 at 11:55













          • No, that package should be included as part of the zendframework/zend-view package (check in the composer.lock file of the project). To make sure, you do not do new PhpRenderer() in the Controller class, right? Because you should be using an injected one (due to requirements I mentioned in the answer).

            – rkeet
            Nov 22 '18 at 11:59











          • I just set it as controller property in the constructor (see edit 2), and it is not used anywhere else

            – JR2
            Nov 22 '18 at 12:03













          • Oh actually i did a new PhpRenderer(), you're right, I replaced it with $this->renderer and now I only have a TCPDF error, thanks a lot

            – JR2
            Nov 22 '18 at 12:07











          • You're welcome, happy coding.

            – rkeet
            Nov 22 '18 at 12:10











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53426460%2fzf3-phprenderer-not-finding-template-path%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          The error you're getting might be due to the fact your Renderer is not injected via the Factory.



          Try:



          class MyCustomControllerFactory implements FactoryInterface
          {
          public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
          {
          /** @var ZendViewRendererPhpRenderer $renderer */
          $renderer = $container->get('ViewRenderer')

          return new MyCustomController($renderer);
          }
          }


          In the Controller, require it be set in the __construct() function:



          public function __construct(PhpRenderer $renderer)
          {
          // ... set it somewhere, e.g.:
          $this->setRenderer($renderer);
          }


          Then use it in your function:



          $view = new ViewModel();
          $renderer = $this->getRenderer();
          $view->setTemplate('tools/tools/alert');
          $html = $renderer->render($view);




          Why, you ask?



          Because the Renderer is configured via the Zend Configuration. You can find that in the ZendMvcServiceServiceManageFactory class. The alias configuration provided is the following:



          'ViewPhpRenderer'                      => 'ZendViewRendererPhpRenderer',
          'ViewRenderer' => 'ZendViewRendererPhpRenderer',
          'ZendViewRendererRendererInterface' => 'ZendViewRendererPhpRenderer',


          The alias'es are mapped to Factory:



          'ZendViewRendererPhpRenderer' => ViewPhpRendererFactory::class,


          That Factory is:



          class ViewPhpRendererFactory implements FactoryInterface
          {
          /**
          * @param ContainerInterface $container
          * @param string $name
          * @param null|array $options
          * @return PhpRenderer
          */
          public function __invoke(ContainerInterface $container, $name, array $options = null)
          {
          $renderer = new PhpRenderer();
          $renderer->setHelperPluginManager($container->get('ViewHelperManager'));
          $renderer->setResolver($container->get('ViewResolver'));

          return $renderer;
          }
          }


          As such, it has some presets included when you use it with $this->getRenderer, namely it has the HelperPluginManager and the Resolver set. So it knows where to get additional resources (if needed) and it knows how to resolve (ie render) a View.






          share|improve this answer
























          • Actually it is, I forgot to include this part to the post (see the edit). But I need to add the configuration of phprenderer you mentionned in the second part ?

            – JR2
            Nov 22 '18 at 11:55













          • No, that package should be included as part of the zendframework/zend-view package (check in the composer.lock file of the project). To make sure, you do not do new PhpRenderer() in the Controller class, right? Because you should be using an injected one (due to requirements I mentioned in the answer).

            – rkeet
            Nov 22 '18 at 11:59











          • I just set it as controller property in the constructor (see edit 2), and it is not used anywhere else

            – JR2
            Nov 22 '18 at 12:03













          • Oh actually i did a new PhpRenderer(), you're right, I replaced it with $this->renderer and now I only have a TCPDF error, thanks a lot

            – JR2
            Nov 22 '18 at 12:07











          • You're welcome, happy coding.

            – rkeet
            Nov 22 '18 at 12:10
















          2














          The error you're getting might be due to the fact your Renderer is not injected via the Factory.



          Try:



          class MyCustomControllerFactory implements FactoryInterface
          {
          public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
          {
          /** @var ZendViewRendererPhpRenderer $renderer */
          $renderer = $container->get('ViewRenderer')

          return new MyCustomController($renderer);
          }
          }


          In the Controller, require it be set in the __construct() function:



          public function __construct(PhpRenderer $renderer)
          {
          // ... set it somewhere, e.g.:
          $this->setRenderer($renderer);
          }


          Then use it in your function:



          $view = new ViewModel();
          $renderer = $this->getRenderer();
          $view->setTemplate('tools/tools/alert');
          $html = $renderer->render($view);




          Why, you ask?



          Because the Renderer is configured via the Zend Configuration. You can find that in the ZendMvcServiceServiceManageFactory class. The alias configuration provided is the following:



          'ViewPhpRenderer'                      => 'ZendViewRendererPhpRenderer',
          'ViewRenderer' => 'ZendViewRendererPhpRenderer',
          'ZendViewRendererRendererInterface' => 'ZendViewRendererPhpRenderer',


          The alias'es are mapped to Factory:



          'ZendViewRendererPhpRenderer' => ViewPhpRendererFactory::class,


          That Factory is:



          class ViewPhpRendererFactory implements FactoryInterface
          {
          /**
          * @param ContainerInterface $container
          * @param string $name
          * @param null|array $options
          * @return PhpRenderer
          */
          public function __invoke(ContainerInterface $container, $name, array $options = null)
          {
          $renderer = new PhpRenderer();
          $renderer->setHelperPluginManager($container->get('ViewHelperManager'));
          $renderer->setResolver($container->get('ViewResolver'));

          return $renderer;
          }
          }


          As such, it has some presets included when you use it with $this->getRenderer, namely it has the HelperPluginManager and the Resolver set. So it knows where to get additional resources (if needed) and it knows how to resolve (ie render) a View.






          share|improve this answer
























          • Actually it is, I forgot to include this part to the post (see the edit). But I need to add the configuration of phprenderer you mentionned in the second part ?

            – JR2
            Nov 22 '18 at 11:55













          • No, that package should be included as part of the zendframework/zend-view package (check in the composer.lock file of the project). To make sure, you do not do new PhpRenderer() in the Controller class, right? Because you should be using an injected one (due to requirements I mentioned in the answer).

            – rkeet
            Nov 22 '18 at 11:59











          • I just set it as controller property in the constructor (see edit 2), and it is not used anywhere else

            – JR2
            Nov 22 '18 at 12:03













          • Oh actually i did a new PhpRenderer(), you're right, I replaced it with $this->renderer and now I only have a TCPDF error, thanks a lot

            – JR2
            Nov 22 '18 at 12:07











          • You're welcome, happy coding.

            – rkeet
            Nov 22 '18 at 12:10














          2












          2








          2







          The error you're getting might be due to the fact your Renderer is not injected via the Factory.



          Try:



          class MyCustomControllerFactory implements FactoryInterface
          {
          public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
          {
          /** @var ZendViewRendererPhpRenderer $renderer */
          $renderer = $container->get('ViewRenderer')

          return new MyCustomController($renderer);
          }
          }


          In the Controller, require it be set in the __construct() function:



          public function __construct(PhpRenderer $renderer)
          {
          // ... set it somewhere, e.g.:
          $this->setRenderer($renderer);
          }


          Then use it in your function:



          $view = new ViewModel();
          $renderer = $this->getRenderer();
          $view->setTemplate('tools/tools/alert');
          $html = $renderer->render($view);




          Why, you ask?



          Because the Renderer is configured via the Zend Configuration. You can find that in the ZendMvcServiceServiceManageFactory class. The alias configuration provided is the following:



          'ViewPhpRenderer'                      => 'ZendViewRendererPhpRenderer',
          'ViewRenderer' => 'ZendViewRendererPhpRenderer',
          'ZendViewRendererRendererInterface' => 'ZendViewRendererPhpRenderer',


          The alias'es are mapped to Factory:



          'ZendViewRendererPhpRenderer' => ViewPhpRendererFactory::class,


          That Factory is:



          class ViewPhpRendererFactory implements FactoryInterface
          {
          /**
          * @param ContainerInterface $container
          * @param string $name
          * @param null|array $options
          * @return PhpRenderer
          */
          public function __invoke(ContainerInterface $container, $name, array $options = null)
          {
          $renderer = new PhpRenderer();
          $renderer->setHelperPluginManager($container->get('ViewHelperManager'));
          $renderer->setResolver($container->get('ViewResolver'));

          return $renderer;
          }
          }


          As such, it has some presets included when you use it with $this->getRenderer, namely it has the HelperPluginManager and the Resolver set. So it knows where to get additional resources (if needed) and it knows how to resolve (ie render) a View.






          share|improve this answer













          The error you're getting might be due to the fact your Renderer is not injected via the Factory.



          Try:



          class MyCustomControllerFactory implements FactoryInterface
          {
          public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
          {
          /** @var ZendViewRendererPhpRenderer $renderer */
          $renderer = $container->get('ViewRenderer')

          return new MyCustomController($renderer);
          }
          }


          In the Controller, require it be set in the __construct() function:



          public function __construct(PhpRenderer $renderer)
          {
          // ... set it somewhere, e.g.:
          $this->setRenderer($renderer);
          }


          Then use it in your function:



          $view = new ViewModel();
          $renderer = $this->getRenderer();
          $view->setTemplate('tools/tools/alert');
          $html = $renderer->render($view);




          Why, you ask?



          Because the Renderer is configured via the Zend Configuration. You can find that in the ZendMvcServiceServiceManageFactory class. The alias configuration provided is the following:



          'ViewPhpRenderer'                      => 'ZendViewRendererPhpRenderer',
          'ViewRenderer' => 'ZendViewRendererPhpRenderer',
          'ZendViewRendererRendererInterface' => 'ZendViewRendererPhpRenderer',


          The alias'es are mapped to Factory:



          'ZendViewRendererPhpRenderer' => ViewPhpRendererFactory::class,


          That Factory is:



          class ViewPhpRendererFactory implements FactoryInterface
          {
          /**
          * @param ContainerInterface $container
          * @param string $name
          * @param null|array $options
          * @return PhpRenderer
          */
          public function __invoke(ContainerInterface $container, $name, array $options = null)
          {
          $renderer = new PhpRenderer();
          $renderer->setHelperPluginManager($container->get('ViewHelperManager'));
          $renderer->setResolver($container->get('ViewResolver'));

          return $renderer;
          }
          }


          As such, it has some presets included when you use it with $this->getRenderer, namely it has the HelperPluginManager and the Resolver set. So it knows where to get additional resources (if needed) and it knows how to resolve (ie render) a View.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 '18 at 10:57









          rkeetrkeet

          1,79521535




          1,79521535













          • Actually it is, I forgot to include this part to the post (see the edit). But I need to add the configuration of phprenderer you mentionned in the second part ?

            – JR2
            Nov 22 '18 at 11:55













          • No, that package should be included as part of the zendframework/zend-view package (check in the composer.lock file of the project). To make sure, you do not do new PhpRenderer() in the Controller class, right? Because you should be using an injected one (due to requirements I mentioned in the answer).

            – rkeet
            Nov 22 '18 at 11:59











          • I just set it as controller property in the constructor (see edit 2), and it is not used anywhere else

            – JR2
            Nov 22 '18 at 12:03













          • Oh actually i did a new PhpRenderer(), you're right, I replaced it with $this->renderer and now I only have a TCPDF error, thanks a lot

            – JR2
            Nov 22 '18 at 12:07











          • You're welcome, happy coding.

            – rkeet
            Nov 22 '18 at 12:10



















          • Actually it is, I forgot to include this part to the post (see the edit). But I need to add the configuration of phprenderer you mentionned in the second part ?

            – JR2
            Nov 22 '18 at 11:55













          • No, that package should be included as part of the zendframework/zend-view package (check in the composer.lock file of the project). To make sure, you do not do new PhpRenderer() in the Controller class, right? Because you should be using an injected one (due to requirements I mentioned in the answer).

            – rkeet
            Nov 22 '18 at 11:59











          • I just set it as controller property in the constructor (see edit 2), and it is not used anywhere else

            – JR2
            Nov 22 '18 at 12:03













          • Oh actually i did a new PhpRenderer(), you're right, I replaced it with $this->renderer and now I only have a TCPDF error, thanks a lot

            – JR2
            Nov 22 '18 at 12:07











          • You're welcome, happy coding.

            – rkeet
            Nov 22 '18 at 12:10

















          Actually it is, I forgot to include this part to the post (see the edit). But I need to add the configuration of phprenderer you mentionned in the second part ?

          – JR2
          Nov 22 '18 at 11:55







          Actually it is, I forgot to include this part to the post (see the edit). But I need to add the configuration of phprenderer you mentionned in the second part ?

          – JR2
          Nov 22 '18 at 11:55















          No, that package should be included as part of the zendframework/zend-view package (check in the composer.lock file of the project). To make sure, you do not do new PhpRenderer() in the Controller class, right? Because you should be using an injected one (due to requirements I mentioned in the answer).

          – rkeet
          Nov 22 '18 at 11:59





          No, that package should be included as part of the zendframework/zend-view package (check in the composer.lock file of the project). To make sure, you do not do new PhpRenderer() in the Controller class, right? Because you should be using an injected one (due to requirements I mentioned in the answer).

          – rkeet
          Nov 22 '18 at 11:59













          I just set it as controller property in the constructor (see edit 2), and it is not used anywhere else

          – JR2
          Nov 22 '18 at 12:03







          I just set it as controller property in the constructor (see edit 2), and it is not used anywhere else

          – JR2
          Nov 22 '18 at 12:03















          Oh actually i did a new PhpRenderer(), you're right, I replaced it with $this->renderer and now I only have a TCPDF error, thanks a lot

          – JR2
          Nov 22 '18 at 12:07





          Oh actually i did a new PhpRenderer(), you're right, I replaced it with $this->renderer and now I only have a TCPDF error, thanks a lot

          – JR2
          Nov 22 '18 at 12:07













          You're welcome, happy coding.

          – rkeet
          Nov 22 '18 at 12:10





          You're welcome, happy coding.

          – rkeet
          Nov 22 '18 at 12:10


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53426460%2fzf3-phprenderer-not-finding-template-path%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          404 Error Contact Form 7 ajax form submitting

          How to know if a Active Directory user can login interactively

          Refactoring coordinates for Minecraft Pi buildings written in Python