我遇到了致命错误EntityMalformedException:类型节点的实体上缺少捆绑属性。 尝试访问user / xyz时,在entity_extract_ids()(。\ includes \ common.inc的第7700行)中。
我试图在第7700行中检索有关格式错误的节点的信息,在该行中生成了错误消息,其内容类似于:
if (!isset($entity->{$info['entity keys']['bundle']}) || $entity->{$info['entity keys']['bundle']} === '') {
dpm($info);// or dpm($entity);
throw new EntityMalformedException(t('Missing bundle property on entity of type @entity_type.', array('@entity_type' => $entity_type)));
}
dpm($entity)
返回意外的用户对象,而$ info包含大量信息。
有人可以让我走对路吗?
我已经读了所有关于缺少捆绑软件属性错误的信息,但是没有一个可以解决。
dpm($entity)
退货
uid (String, 2 characters ) 70
name (String, 9 characters ) John
pass (String, 55 characters ) $S$DUwPuOuDPiDL4nRTYXqc7a5uOfMKey7pyhOFUEKka1XM...
mail (String, 30 characters ) john@example.com
theme (String, 0 characters )
signature (String, 0 characters )
signature_format (String, 13 characters ) filtered_html
created (String, 10 characters ) 1396286331
access (String, 10 characters ) 1397146661
login (String, 10 characters ) 1396513460
status (String, 1 characters ) 1
timezone (NULL)
language (String, 2 characters ) fr
picture (NULL)
init (String, 30 characters ) john@example.com
data (Array, 5 elements)
roles (Array, 1 element)
og_user_node (Array, 0 elements)
message_subscribe_email (Array, 1 element)
field_bio (Array, 0 elements)
field_name_first (Array, 1 element)
field_name_last (Array, 1 element)
field_facebook_url (Array, 0 elements)
field_linkedin_url (Array, 0 elements)
field_twitter_url (Array, 0 elements)
user_trusted_contacts (Array, 1 element)
group_group (Array, 1 element)
group_access (Array, 1 element)
metatags (Array, 0 elements)
rdf_mapping (Array, 3 elements)
realname (String, 13 characters ) John Doe
content (Array, 13 elements)
entity_view_prepared (Boolean) TRUE
privatemsg_disabled (Boolean) FALSE
entity_extract_ids('node', $var);
,但是$var
它传递了一个用户对象,而不是它的节点对象。如果您有任何自定义或开发版本的contrib模块,请尝试逐个禁用它们,以查看是否有罪魁祸首
dpm(debug_print_backtrace());
在这里将是无价之宝。你可以看到模块由以下功能回请求年初开始全部关闭
xdebug.collect_params = 4
这也将使您的生活更加轻松