【问题标题】:Cannot update to Drupal 8.7.1 because of taxonomy_post_update_make_taxonomy_term_revisionable由于 taxonomy_post_update_make_taxonomy_term_revisionable 无法更新到 Drupal 8.7.1
【发布时间】:2019-10-03 16:00:44
【问题描述】:

运行composer update drupal/core webflo/drupal-core-require-dev --with-dependencies更新到v8.7.1后,再运行drush updb,这里更新失败:

[notice] Update started: taxonomy_post_update_make_taxonomy_term_revisionable [4.77 sec, 33.46 MB]
[error]  Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null: INSERT INTO {tmp_b3edd9taxonomy_term_field_data} (tid, revision_id, vid, langcode, name, description__value, description__format, weight, changed, default_langcode, status, revision_translation_affected) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11); 
Array
(
   [:db_insert_placeholder_0] => 1
   [:db_insert_placeholder_1] => 1
   [:db_insert_placeholder_2] => tags
   [:db_insert_placeholder_3] => zxx
   [:db_insert_placeholder_4] =>
   [:db_insert_placeholder_5] =>
   [:db_insert_placeholder_6] =>
   [:db_insert_placeholder_7] =>
   [:db_insert_placeholder_8] =>
   [:db_insert_placeholder_9] =>
   [:db_insert_placeholder_10] =>
   [:db_insert_placeholder_11] => 1
)
in Drupal\Core\Database\Connection->handleQueryException() (line 689 of /mnt/www/html/optivode42/docroot/core/lib/Drupal/Core/Database/Connection.php). [7.12 sec, 45.21 MB]
[error]  The entity update process failed while processing the entity type taxonomy_term, ID: 1. [8.17 sec, 45.24 MB]
[error]  Update failed: taxonomy_post_update_make_taxonomy_term_revisionable [8.17 sec, 38.9 MB]

其他解决方案在 taxonomy_term_field_data 字段中显示错误数据,但这似乎不是问题所在。

我检查了taxonomy_term_field_data,没有name为NULL的记录,我什至没有任何带有langcodezxx的记录,所以我现在有点不知所措。似乎没有什么我可以删除来​​解决这个问题,就像其他答案一样。

*编辑:我在 taxonomy_term_data 中有 langcode zxx 记录,所以我删除了这些记录,我得到了同样的错误,但是:

Array
(
   [:db_insert_placeholder_0] => 2
   [:db_insert_placeholder_1] => 2
   [:db_insert_placeholder_2] => tags
   [:db_insert_placeholder_3] => en
   [:db_insert_placeholder_4] =>
   [:db_insert_placeholder_5] =>
   [:db_insert_placeholder_6] =>
   [:db_insert_placeholder_7] =>
   [:db_insert_placeholder_8] =>
   [:db_insert_placeholder_9] =>
   [:db_insert_placeholder_10] =>
   [:db_insert_placeholder_11] => 1
)

【问题讨论】:

    标签: drupal drupal-8 drush


    【解决方案1】:

    我发现这与 replicate-ui module 中的一个错误有关,该错误实际上创建了分类法,而没有在 taxonomy_index 表中创建真正的父记录。

    因此,我已向开发人员提交了一份错误报告来解决此问题。

    与此同时,我实际上升级到了 Drupal v8.6.16,因为它有我需要的安全更新,而且我还不需要一路升级到 v8.7。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-06
      • 2019-03-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-24
      相关资源
      最近更新 更多