drupal - 以编程方式更新时配置文件 2 出错

标签 drupal drupal-7 drupal-modules user-profile

EntityMalformedException:类型 profile2 的实体缺少 bundle 属性。在entity_extract_ids()中

最佳答案

如果用户的 profile2 不存在,通常会出现此错误。请确保您要更新的用户是否具有有效的个人资料实体。您可以使用函数 profile2_load_by_user($account, $type_name = NULL) 检查 profile2。

谢谢。

关于drupal - 以编程方式更新时配置文件 2 出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39740205/

相关文章:

drupal - "Drupal way"向导步骤?

javascript - 如何删除 Drupal 安装时加载的第二个 jquery 库

php - 主题化 Drupal 7's Ubercart "/购物车”页面

drupal - 如何使 Drupal 7 模块用完主题文件夹中的 .tpl.php 模板

php - 在 Drupal 中从 Excel 中提取内容

html - 如何使用 HTML/CSS 对齐图像下的文本?

wordpress - Drupal、Joomla 和 WordPress 基准测试结果

drupal - 是否可以使用常规 HTML 表单作为 Drupal 6.x 自定义模块中 .inc 文件的一部分?

drupal-modules - Drupal 8 语言切换器主题文件

drupal - 使用表单 api : drupal 7 向选项元素添加属性