Symfony2 WebProfiler (500): Key “default” does not

2019-08-13 05:38发布

Symfony2 WebProfiler (500): Key "default" does not exist as the array is empty in @Doctrine/Collector/db.html.twig at line 209

I have installed Sonata e-commerce 2.3 branch (fresh installation) on several machines (php 5.4, php 5.5), everything works fine, but and on each one i have the same error in profiler doctrine DB tab:

Symfony2 WebProfiler (500): Key "default" does not exist as the array is empty in @Doctrine/Collector/db.html.twig at line 209

Profiler is working fine only after first request (when cache is empty), after the next request there is the error. I was searching the web for the solution, but without success..

thanks in advance

1条回答
Root(大扎)
2楼-- · 2019-08-13 06:12

You can override @Doctrine/Collector/db.html.twig template by your own. Just add condition if collector.mappingErrors[manager] is defined in your new template on line 209.

查看更多
登录 后发表回答