找回密码
 立即注册
查看: 1482|回复: 0

解决drupal的一个问题

[复制链接]

6782

主题

8

回帖

2万

积分

管理员

积分
21777
发表于 2019-5-21 10:40:05 | 显示全部楼层 |阅读模式
drupal后台总是提示如下错误:
Notice: Undefined index: comment_node_forum in _field_ui_bundle_admin_path() (line 320 of /path/to/drupal/modules/field_ui/field_ui.module).
Notice: Undefined index: comment_node_forum in field_ui_fields_list() (line 35 of /path/to/drupal/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: forum in _field_ui_bundle_admin_path() (line 320 of /path/to/drupal/modules/field_ui/field_ui.module).
Notice: Undefined index: forum in field_ui_fields_list() (line 35 of /path/to/drupal/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: forum in _field_ui_bundle_admin_path() (line 320 of /path/to/drupal/modules/field_ui/field_ui.module).
Notice: Undefined index: forum in field_ui_fields_list() (line 35 of /path/to/drupal/modules/field_ui/field_ui.admin.inc).

google了一下,找到如下解决办法:http://drupal.org/node/1351506(5楼的办法,解决了,百度根本搜不到相关的内容,超级鄙视一下)


I recently ran into this problem, and here is what I found...

As comment #3 says, manually deleting the row, and flushing the cache seems to fix the problem...but which row to delete?

In the warning message, you want to look for the undefined indexes (in bold):
Notice: Undefined index: comment_node_forum in _field_ui_bundle_admin_path() (line 320 of /path/to/drupal/modules/field_ui/field_ui.module).
Notice: Undefined index: comment_node_forum in field_ui_fields_list() (line 35 of /path/to/drupal/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: forum in _field_ui_bundle_admin_path() (line 320 of /path/to/drupal/modules/field_ui/field_ui.module).
Notice: Undefined index: forum in field_ui_fields_list() (line 35 of /path/to/drupal/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: forum in _field_ui_bundle_admin_path() (line 320 of /path/to/drupal/modules/field_ui/field_ui.module).
Notice: Undefined index: forum in field_ui_fields_list() (line 35 of /path/to/drupal/modules/field_ui/field_ui.admin.inc).

Once we found the names of what is being incorrectly indexed, we can use it to delete the offending rows, with an sql command, like this:

delete from field_config_instance where bundle = 'forum' || bundle = 'comment_node_forum';

then flush your drupal cache.

This is what I found works for me. Hopefully it will help someone else save some time to fix the same/similar problem.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表