1

我正在尝试在我的 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']"]
)

我需要手动插入该信息吗?

4

1 回答 1

3

我不知道您的 civicrm_option_value 表中如何缺少“标签”字段。我只能猜测,也许您尝试从以前的版本升级而不运行数据库升级步骤。

缺少列的直接问题可以通过运行以下命令来解决:

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.';

但是,如果这搞砸了,很有可能你的数据库还有其他问题,所以你应该先检查一下。

于 2014-10-01T15:07:53.163 回答