Symfony 3.4:找不到模板"FOSUserBundle::layout.html.twig"



我正试图在symfony 3.4项目中设置FOSUserBundle。当访问登录页面时,我得到这个错误:

在@FOSUser/Security/login.html.twig的第1行找不到模板"FOSUserBundle::layout.html.twick"(已查看:app/Resources/views,vendor/symfony/symfoy/Bridge/twig/Resources/views/Form(。

实际上找到了登录模板,但登录模板使用了FOSUserBundle::layout.html.twig:

{% extends "FOSUserBundle::layout.html.twig" %}

这是我在app/Resources文件夹中的树,权限和所有权似乎都可以:

app/Resources/
├── FOSUserBundle
│   ├── translations
│   │   └── FOSUserBundle.es.yml
│   └── views
│       ├── layout.html.twig
│       └── Security
│           └── login.html.twig
└── views
├── base.html.twig
├── default
│   └── index.html.twig

这种结构曾用于Symfony 2.8项目。我试过不同的地方,但运气不好。

顺便说一句,翻译也找不到

有什么想法吗?

您尝试过{%extends"::layout.html.twitch"%}吗?

最新更新