Symfony2与FOSUserBundle问题

时间:2016-06-26 09:31:55

标签: php symfony fosuserbundle

我将我的Symfony2项目配置为使用FOSUserBundle进行身份验证并且它通常可以正常工作,但是当我在浏览器中关闭我的站点选项卡(被记录)然后在新选项卡中再次打开我的站点时,我得到:

  

服务器返回了" 500内部服务器错误"。

在我的日志中,我看到了:

[2016-06-26 12:14:24] security.DEBUG: Read existing security token from the session. {"key":"_security_main"} [] 
[2016-06-26 12:14:24] security.DEBUG: User was reloaded from a user provider. {"username":"dimitrioglo","provider":"FOS\\UserBundle\\Security\\UserProvider"} []
[2016-06-26 12:14:24] request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "Unable to find template "AppBundle:Default:UserBundle:Registration:confirmed.html.twig.html.twig" (looked into: /app/Resources/views, /vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form)." at /vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php line 128 {"exception":"[object] (InvalidArgumentException(code: 0): Unable to find template \"AppBundle:Default:UserBundle:Registration:confirmed.html.twig.html.twig\" (looked into: /app/Resources/views, /vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form). at /vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php:128, Twig_Error_Loader(code: 0): Unable to find template \"AppBundle:Default:UserBundle:Registration:confirmed.html.twig.html.twig\" (looked into: /app/Resources/views, /vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form). at /vendor/twig/twig/lib/Twig/Loader/Filesystem.php:215)"} [] 
[2016-06-26 12:14:24] security.DEBUG: Stored the security token in the session. {"key":"_security_main"} []

我不理解的是为什么FOSUserBundle寻找Registration:confirmed.html.twig.html.twig而不是Registration:confirmed.html.twig

更新1:

fos_user:
    resource: "@FOSUserBundle/Resources/config/routing/all.xml"

0 个答案:

没有答案