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

我需要手动插入这些信息吗?

最佳答案

我不知道“label”字段是如何从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.';

但是,如果这是一个混乱的情况,很有可能有其他问题与您的数据库,所以您应该首先检查。

关于mysql - Wordpress上的CiviCRM-CiviCase无法启用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25534234/

10-10 06:47