配置文件编辑

时间:2016-02-12 18:41:16

标签: symfony sonata sonata-user-bundle

我使用持续的奏鸣曲管理员和奏鸣曲用户捆绑包配置symfony 2.7安装。我的后端运行良好,也是工作/个人资料页面,但我在/ 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文件中查找该模板提及但我没有看到它。 任何帮助都会被贬低。

1 个答案:

答案 0 :(得分:0)

最后,我找到安装mopa bootsrap bundle的解决方案并进行配置。