Closed moueza closed 6 years ago
http://localhost/symfony028activiteCorebundle/activite2/web/app_dev.php/platform/1 fails Unable to find template "OCPlatformBundle::layout.html.twig" (looked into: /var/www/html/symfony028activiteCorebundle/activite2/app/Resources/views, /var/www/html/symfony028activiteCorebundle/activite2/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form) in OCPlatformBundle:Advert:index.html.twig at line 1. Exceptions 2 Logs 1 Stack Traces 2 InvalidArgumentException in vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php (line 127) TwigEngine->load('OCPlatformBundle:Advert:index.html.twig') in vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php (line 49) TwigEngine->render('OCPlatformBundle:Advert:index.html.twig', array()) in vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php (line 45) TwigEngine->render('OCPlatformBundle:Advert:index.html.twig', array()) in vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php (line 284) Controller->render('OCPlatformBundle:Advert:index.html.twig') in src/OC/PlatformBundle/Controller/AdvertController.php (line 71) } // Ici, on récupérera la liste des annonces, puis on la passera au template // Mais pour l'instant, on ne fait qu'appeler le template return $this->render('OCPlatformBundle:Advert:index.html.twig'); }
Current Namespaces ./bin/console debug:twig (https://stackoverflow.com/questions/47832977/symfony-3-4-use-view-inside-my-bundle "for some reasons...")
In Symfony 3.4, only maintained in 3.x, :: notation seems failing now (https://openclassrooms.com/forum/sujet/symfony-3-probleme-de-layout ) Look at Referencing Templates in a Bundle of https://symfony.com/doc/3.4/templating.html