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

爱⌒轻易说出口 提交于 2019-12-11 09:08:36

问题


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:


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.



来源:https://stackoverflow.com/questions/30276661/symfony2-webprofiler-500-key-default-does-not-exist-as-the-array-is-empty-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!