配置文件编辑时奏鸣曲用户包错误
Sonata User Bundle error on profile edit
我使用最新的 sonata admin 和 sonata user 包配置了 symfony 2.7 安装。我的后端运行良好,/profile 页面也运行良好,但我在 /profile/edit-profile 和 /profile/edit-authentication 中收到此错误:
Unable to find template "MopaBootstrapBundle:Form:fields.html.twig" in SonataUserBundle:ChangePassword:changePassword_content.html.twig at line 2.
这是我的config.yml
fos_user:
...
profile:
form:
type: fos_user_profile
handler: fos_user.profile.form.handler.default
name: fos_user_profile_form
validation_groups: [Authentication]
sonata_user:
...
profile: # Profile Form (firstname, lastname, etc ...)
form:
type: sonata_user_profile
handler: sonata.user.profile.form.handler.default
name: sonata_user_profile_form
validation_groups: [Profile]
和一些路线:
sonata_user_resetting:
resource: "@SonataUserBundle/Resources/config/routing/sonata_resetting_1.xml"
prefix: /resetting
sonata_user_profile:
resource: "@SonataUserBundle/Resources/config/routing/sonata_profile_1.xml"
prefix: /profile
sonata_user_change_password:
resource: "@SonataUserBundle/Resources/config/routing/sonata_change_password_1.xml"
prefix: /profile
也在该 twig 文件中查找提到的模板,但我没有看到。
任何帮助将不胜感激。
最后我找到了安装 mopa bootsrap bundle 并配置它的解决方案。
我使用最新的 sonata admin 和 sonata user 包配置了 symfony 2.7 安装。我的后端运行良好,/profile 页面也运行良好,但我在 /profile/edit-profile 和 /profile/edit-authentication 中收到此错误:
Unable to find template "MopaBootstrapBundle:Form:fields.html.twig" in SonataUserBundle:ChangePassword:changePassword_content.html.twig at line 2.
这是我的config.yml
fos_user:
...
profile:
form:
type: fos_user_profile
handler: fos_user.profile.form.handler.default
name: fos_user_profile_form
validation_groups: [Authentication]
sonata_user:
...
profile: # Profile Form (firstname, lastname, etc ...)
form:
type: sonata_user_profile
handler: sonata.user.profile.form.handler.default
name: sonata_user_profile_form
validation_groups: [Profile]
和一些路线:
sonata_user_resetting:
resource: "@SonataUserBundle/Resources/config/routing/sonata_resetting_1.xml"
prefix: /resetting
sonata_user_profile:
resource: "@SonataUserBundle/Resources/config/routing/sonata_profile_1.xml"
prefix: /profile
sonata_user_change_password:
resource: "@SonataUserBundle/Resources/config/routing/sonata_change_password_1.xml"
prefix: /profile
也在该 twig 文件中查找提到的模板,但我没有看到。 任何帮助将不胜感激。
最后我找到了安装 mopa bootsrap bundle 并配置它的解决方案。