FOSUserBundle寄存器中的空白页

时间:2013-06-03 18:06:31

标签: symfony fosuserbundle

我刚刚将Symfony 2.2.2项目升级到2.3。我也在使用FOSUserBundle。该捆绑包在项目2.2.2中正常工作。但是当我升级时,路由/用户/注册不再起作用。整页空白。路由/登录工作正常,我可以登录到我的页面,但注册页面是空白的。我没有更改任何内容。

在composer.json中我有:

"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.3.*",
    "doctrine/orm": ">=2.2.3,<2.4-dev",
    "doctrine/doctrine-bundle": "1.2.*",
    "twig/extensions": "1.0.*",
    "symfony/assetic-bundle": "2.3.*",
    "symfony/swiftmailer-bundle": "2.3.*",
    "symfony/monolog-bundle": "2.3.*",
    "sensio/distribution-bundle": "2.3.*",
    "sensio/framework-extra-bundle": "2.3.*",
    "sensio/generator-bundle": "2.3.*",
    "incenteev/composer-parameter-handler": "~2.0",        
    "jms/security-extra-bundle": "1.4.*@dev",
    "jms/di-extra-bundle": "1.3.*@dev",
    "friendsofsymfony/user-bundle": "dev-master",
    "gedmo/doctrine-extensions": "dev-master",
    "stof/doctrine-extensions-bundle" : "dev-master",
    "knplabs/knp-paginator-bundle": "dev-master",
    "knplabs/knp-time-bundle": "dev-master",
    "ornicar/gravatar-bundle" : "dev-master",
    "ob/highcharts-bundle": "dev-master",
    "whiteoctober/breadcrumbs-bundle": "dev-master"
},

我的/app/config/routing.yml

#...
user:
    resource: "@AcmeUserBundle/Resources/config/routing.yml"
    prefix:   /

fos_user_security:
    resource: "@FOSUserBundle/Resources/config/routing/security.xml"

fos_user_profile:
    resource: "@FOSUserBundle/Resources/config/routing/profile.xml"
    prefix: /user/profile

fos_user_register:
    resource: "@FOSUserBundle/Resources/config/routing/registration.xml"
    prefix: /user/register

fos_user_resetting:
    resource: "@FOSUserBundle/Resources/config/routing/resetting.xml"
    prefix: /user/resetting

fos_user_change_password:
    resource: "@FOSUserBundle/Resources/config/routing/change_password.xml"
    prefix: /user

# Internal routing configuration to handle ESI
#_internal:
#    resource: "@FrameworkBundle/Resources/config/routing/internal.xml"
#    prefix:   /_internal

和文件:/src/Acme/UserBundle/Resources/config/routing.yml

user_list:
    pattern:  /admin/user/list
    defaults: { _controller: AcmeUserBundle:Default:list }

user_change_role:
    pattern:  /admin/user/change-role/{id}/{role}
    defaults: { _controller: AcmeUserBundle:Default:role }
    requirements:
        id:  \d+

有人知道解决问题的方法吗?

1 个答案:

答案 0 :(得分:0)

我有同样的问题,对我来说错误是我的路由。 有两个具有相同路线的indexActions。当我更改它时,它解决了空白页问题。