小编Bol*_*Bol的帖子

Symfony 2 - 加载Web调试工具栏时出错(404:Not Found)

自从更新到symfony 2.2以来,app_dev.php中不再加载Web调试工具栏.

我收到以下错误:

An error occurred while loading the web debug toolbar (404: Not Found).
Do you want to open the profiler?
Run Code Online (Sandbox Code Playgroud)

在prod.log中,我得到以下内容:

request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /_profiler/84fb75cc3ffd5435474ebe4250e01fac2cdf49c1"" at /httpdocs/project/app/cache/prod/classes.php line 3597 [] []

request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /_wdt/452d5b4aa2dd9388285fa1c286d5c54218029c71"" at /httpdocs/priject/app/cache/prod/classes.php line 3597 [] []
Run Code Online (Sandbox Code Playgroud)

我已多次清除缓存:)

有趣的是,在/app_dev.php中,页面上的所有链接都不再链接到/app_dev.php.

包括配置文件(/ _profiler/5fdc27cb82c4e9e426b3ab27377deb0b760fdca2),当我手动修改网址,并将app_dev.php添加到网址时,探查器正确加载.

routing_dev.yml:

_assetic:
    resource: .
    type:     assetic

_wdt:
    resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
    prefix:   /_wdt

_profiler:
    resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
    prefix:   /_profiler

_configurator:
    resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml" …
Run Code Online (Sandbox Code Playgroud)

routing toolbar http-status-code-404 symfony

13
推荐指数
3
解决办法
2万
查看次数

标签 统计

http-status-code-404 ×1

routing ×1

symfony ×1

toolbar ×1