【解决】请问这个问题怎么解决啊

Events happening in the community are now at Drupal community events on www.drupal.org.
yutaolife's picture

我现在遇到了一个问题 当我提交comment的时候 会报下面的错误
EntityMalformedException: Missing bundle property on entity of type comment. in entity_extract_ids() (line 7633 of /var/www/html/music/includes/common.inc).

我在Google里面查了好久 都没有得到什么有价值的信息
请问版上有朋友遇到过吗?

解决方法:
经过一夜的查找,原来是OG Feature这个模块的bug.
http://drupal.org/node/1955826

升级后 或者 打补丁后 就可以解决

谢谢各位 drupaler的帮助

非常感谢

Comments

调用entity_extract_ids()

xps's picture

调用entity_extract_ids() 的地方很多,这个异常说明有bundle信息错误的地方。

我之前遇到是因为在field_create_instance()时把bundle写错了,此时drupal并不检查bundle的有效性。而在使用过程中调用这个field就发生这样的异常。

我觉得你可以先清空一下缓存试试。
如果可以重新安装相应module。
实在不行可以用Xdebug设置异常断点,或catch这个异常打印 stack trace,确定异常的具体来源再做判断。

Drupal made me crazy, the sick kind.

yutaolife's picture

请问 还有啥简单的方法吗?

因为 我不是PHP dev 所以不太会弄这东西

我的brand new的drupal 啥还都没有配置呢

你可以安装devel和commerce

alfababy's picture

你可以安装devel和commerce devel模块,它会把出错的地方打印出来,你看一下具体是在哪里出问题了。然后尝试修复。

zterry95's picture

这个问题有时候是莫名其妙的。
我在刚开始接触Drupal 7的时候遇到过。当时是wamp下。

后来同样的代码,同样的数据库,移植到lamp环境,这个错误就消失了。

难道说 这个drupal core的问题吗?

yutaolife's picture

难道说 这个drupal core的问题吗?

dan.hu's picture

试试把comment模块禁用 -> 卸载 -> 重新启用。

yutaolife's picture

请问您指的禁用是module里面uncheck吧

卸载是?

ycshen's picture

uncheck之后,要unintall里面将模块残留清除。

Modules页面上的 Uninstall tab 下面

dan.hu's picture

Modules页面上的 Uninstall tab 下面

ycshen's picture

1、有可能是模块冲突,在出现这个报错前是否启用过那些模块?
2、可以在一个干净的drupal中实验comment功能,以排除系统问题的可能性。

Bei Jing (China)

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: