Symfony2 WebProfiler(500):密钥“默认”不存在,因为该数组在第209行的@ Doctrine / Collector / db.html.twig中为空 [英] Symfony2 WebProfiler (500): Key "default" does not exist as the array is empty in @Doctrine/Collector/db.html.twig at line 209

查看:70
本文介绍了Symfony2 WebProfiler(500):密钥“默认”不存在,因为该数组在第209行的@ Doctrine / Collector / db.html.twig中为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Symfony2 WebProfiler(500):由于数组在209行的@ Doctrine / Collector / db.html.twig中为空,因此键默认不存在

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

我已经在几台机器(php 5.4,php 5.5)上安装了Sonata e-commerce 2.3分支(全新安装),一切正常,但是在每台机器上,我在探查器学说DB选项卡中都有相同的错误:

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仅在第一个请求后(缓存为空)工作正常,下一个请求后错误。
我正在网上寻找解决方案,但没有成功。.

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..

预先感谢

推荐答案

您可以自己覆盖@ Doctrine / Collector / db.html.twig模板。只需添加条件如果在第209行的新模板中定义了collector.mappingErrors [manager] 即可。

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.

这篇关于Symfony2 WebProfiler(500):密钥“默认”不存在,因为该数组在第209行的@ Doctrine / Collector / db.html.twig中为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆