我正在尝试在我的CiviCRM + Wordpress安装中启用CiviCase(我似乎无法找到CiviCRM的独立安装)。但是,当我在Administer > Administration Console > Configuration Checklist > Enable components
中完成启用过程时,它会告诉我:
Sorry but we are not able to provide this at the moment.
DB Error: no such field
有人可以告诉我如何纠正这个问题吗?我是否需要在MySQL数据库中手动创建表/字段?如果是这样,我需要创建哪些字段?我正在使用CiviCRM 4.4.6和Wordpress 3.9.2。
修改
以下是我收到的完整错误消息(已启用调试):
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => INSERT INTO `civicrm_option_value` ( `option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
(SELECT @option_group_id_case_type, 'Housing Support', @max_val + 1, 'housing_support', NULL, 0, 0, @max_wt + 1, 'Help homeless individuals obtain temporary and long-term housing', 0, 0, 1
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'housing_support')) [nativecode=1054 ** Unknown column 'label' in 'field list']
[type] => DB_Error
[user_info] => INSERT INTO `civicrm_option_value` ( `option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
(SELECT @option_group_id_case_type, 'Housing Support', @max_val + 1, 'housing_support', NULL, 0, 0, @max_wt + 1, 'Help homeless individuals obtain temporary and long-term housing', 0, 0, 1
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'housing_support')) [nativecode=1054 ** Unknown column 'label' in 'field list']
[to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO `civicrm_option_value` ( `option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
(SELECT @option_group_id_case_type, 'Housing Support', @max_val + 1, 'housing_support', NULL, 0, 0, @max_wt + 1, 'Help homeless individuals obtain temporary and long-term housing', 0, 0, 1
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'housing_support')) [nativecode=1054 ** Unknown column 'label' in 'field list']"]
)
我是否需要手动插入该信息?
答案 0 :(得分:3)
我不知道"标签"您的civicrm_option_value表中缺少字段。我可以猜到的是,您可能尝试从以前的版本升级而不运行数据库升级步骤。
可以通过runnint解决丢失列的直接问题:
ALTER TABLE `civicrm_option_value`
ADD `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL
COMMENT 'Option string as displayed to users - e.g. the label in an HTML OPTION tag.';
但是,如果这搞砸了,那么您的数据库很可能还有其他问题,所以您应该先检查一下。