Since the update to symfony 2.2, the web debug toolbar is no longer loaded in app_dev.php.
I get the following error:
An error occurred while loading the web debug toolbar (404: Not Found).
Do you want to open the profiler?
In the prod.log I get the following:
request.ERROR: Uncaught PHP Exception SymfonyComponentHttpKernelExceptionNotFoundHttpException: "No route found for "GET /_profiler/84fb75cc3ffd5435474ebe4250e01fac2cdf49c1"" at /httpdocs/project/app/cache/prod/classes.php line 3597 [] []
request.ERROR: Uncaught PHP Exception SymfonyComponentHttpKernelExceptionNotFoundHttpException: "No route found for "GET /_wdt/452d5b4aa2dd9388285fa1c286d5c54218029c71"" at /httpdocs/priject/app/cache/prod/classes.php line 3597 [] []
I have cleared the cache several times :)
Interesting is the fact that in /app_dev.php all links on the page no longer links to /app_dev.php.
including the profile (/_profiler/5fdc27cb82c4e9e426b3ab27377deb0b760fdca2)
when i modify the url manually, and add the app_dev.php to the url, the profiler loads correctly.
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"
prefix: /_configurator
_main:
resource: routing.yml
I would be grateful for any help.
UPDATE I: config_dev.yml
imports:
- { resource: config.yml }
framework:
router: { resource: "%kernel.root_dir%/config/routing_dev.yml" }
profiler: { only_exceptions: false }
web_profiler:
toolbar: true
intercept_redirects: false
monolog:
handlers:
main:
type: stream
path: %kernel.logs_dir%/%kernel.environment%.log
level: debug
firephp:
type: firephp
level: info
chromephp:
type: chromephp
level: info
assetic:
use_controller: true
UPDATE II: AppKernel.php
use SymfonyComponentHttpKernelKernel;
use SymfonyComponentConfigLoaderLoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new SymfonyBundleFrameworkBundleFrameworkBundle(),
new SymfonyBundleSecurityBundleSecurityBundle(),
new SymfonyBundleTwigBundleTwigBundle(),
new SymfonyBundleMonologBundleMonologBundle(),
new SymfonyBundleSwiftmailerBundleSwiftmailerBundle(),
new SymfonyBundleAsseticBundleAsseticBundle(),
new DoctrineBundleDoctrineBundleDoctrineBundle(),
new SensioBundleFrameworkExtraBundleSensioFrameworkExtraBundle(),
new JMSAopBundleJMSAopBundle(),
new JMSDiExtraBundleJMSDiExtraBundle($this),
new JMSSecurityExtraBundleJMSSecurityExtraBundle(),
new myProjectMyBundlemyBundle(),
new FOSUserBundleFOSUserBundle(),
new myProjectMyBackendBundlemyBackendBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new SymfonyBundleWebProfilerBundleWebProfilerBundle();
$bundles[] = new SensioBundleDistributionBundleSensioDistributionBundle();
$bundles[] = new SensioBundleGeneratorBundleSensioGeneratorBundle();
}
return $bundles;
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
}
}
Update III: .htaccess
DirectoryIndex app.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^app.php(/(.*)|$) %{CONTEXT_PREFIX}/$2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule .? %{ENV:BASE}app.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /app.php/
</IfModule>
</IfModule>
UPDATE: I have found the error, it was a wrong (old) render tag in a template. :(
Thanks for your support
See Question&Answers more detail:
os