我有一个项目,在Symfony2中每个活动域都安排了多个捆绑软件。该项目在本地WAMP的以下域中运行:Agapp.local,具有以下 app / config / routing。 yml
I've a project with multiple bundles arranged per domain of activities in Symfony2.The project is running under the following domain one my local WAMP : Agapp.local with the following app/config/routing.yml
ag_app: resource: "@AgAppBundle/Resources/config/routing.yml" prefix: / ag_apsa: resource: "@AgApsaBundle/Resources/config/routing.yml" prefix: /apsa ag_training: resource: "@AgTrainingBundle/Resources/config/routing.yml" prefix: /training ag_intern: resource: "@AgInternBundle/Resources/config/routing.yml" prefix: /parents/intern ag_parents: resource: "@AgParentsBundle/Resources/config/routing.yml" prefix: /parents ag_circo: resource: "@AgCircoBundle/Resources/config/routing.yml" prefix: /circo ag_ecole: resource: "@AgEcoleBundle/Resources/config/routing.yml" prefix: /ecoleAgApsaBundle具有以下主要路由文件:
The AgApsaBundle has the following main routing file:
ag_apsa_homepage: path: / defaults: { _controller: AgrementApsaBundle:Apsa:index } ag_apsa: resource: "@AgrementApsaBundle/Resources/config/routing/apsa.yml" prefix: /这是AgApsaBundle.yml内容:
And here is the AgApsaBundle.yml content:
apsa: path: / defaults: { _controller: "AgrementApsaBundle:Apsa:index" } apsa_show: path: /{id}/show defaults: { _controller: "AgApsaBundle:Apsa:show" } apsa_new: path: /new defaults: { _controller: "AgApsaBundle:Apsa:new" } apsa_create: path: /create defaults: { _controller: "AgApsaBundle:Apsa:create" } requirements: { _method: post } apsa_edit: path: /{id}/edit defaults: { _controller: "AgApsaBundle:Apsa:edit" } apsa_update: path: /{id}/update defaults: { _controller: "AgApsaBundle:Apsa:update" } requirements: { _method: post|put } apsa_delete: path: /{id}/delete defaults: { _controller: "AgApsaBundle:Apsa:delete" } requirements: { _method: post|delete }AppKernel信息:
The AppKernel info :
新的Ag\Metiers\Etab\EcoleBundle\AgEcoleBundle(),新的Ag\Metiers\Etab \CircoBundle\AgCircoBundle(),新的Ag\Metiers\父母\ParentsBundle\AgParentsBundle(),新的Ag\Metiers\Parents\InternBundle\AgInternBundle() ,个新的Ag\Metiers\培训\TrainingBundle\AgTrainingBundle(),个新的Ag\Metiers\TrainingApsaBundle\AgApsaBundle(),个新的Ag\AppBundle\ AppAgAppBundle(),
所有路线均已正确注册并通过 router:debug 命令确认。 但是,尝试访问 AgApp.local / apsa 或与Apsa捆绑包相关的任何其他路由时,它返回 未收到数据加载网页,因为服务器未发送任何数据。,而日志中记录了找到了路由的情况。相反,尝试 AgApp.local / apsa / parents 会引发404错误。 您可能会发现日志跟踪此处
All the routes are well registered and listed ,as confirmed by the router:debug command. However, trying to access the AgApp.local/apsa or any other route related to the Apsa bundle, it returns a 'No data received Unable to load the webpage because the server sent no data.', while the log registers that a macthed route was found. On the opposite, trying a AgApp.local/apsa/parents will throw a 404 error. You may find the log trace here
我是否在路由配置中缺少某些内容?
Am i missing something in the routing configuration?
推荐答案之后,我进行了更多研究,发现路线本身并不是问题的起因。相反,在学说中,您可以找到相关的问题此处
After , more research i found that the routes themselves were not the cause of the issue .But rather Doctrine, you can find the related question here
更多推荐
具有多个捆绑和配置级别的Symfony2路由问题
发布评论