我在项目中使用Sonata UserBundle,我按照here
上的文档进行操作我想我做得很好,证明:我也可以访问管理员登录,但当我尝试以匿名用户身份登录时,我收到了以下错误:
INFO - Matched route "fos_user_security_login" (parameters: "_controller": "Sonata\UserBundle\Controller\SecurityFOSUser1Controller::loginAction", "_route": "fos_user_security_login") INFO - Populated SecurityContext with an anonymous Token CRITICAL - Uncaught PHP Exception InvalidArgumentException: "Unable to find template "FOSUserBundle:Security:login.html.twig"." at C:\wamp\www\Symfony\vendor\symfony\symfony\src\Symfony\Bridge\Twig\TwigEngine.php line 128 Context: {"exception":"Object(InvalidArgumentException)"}
问题出在哪里?
答案 0 :(得分:0)
您是否在内核中启用了FOSUserBundle?