When processing lingotek_update_8011() for update from Lingotek 8.x-1.12 to 8.x-2.0-rc1, the update process errors with the following error and the update aborts and lingotek_update_8011() can not completely process, which leaves the site unresponsive with "Base table or view not found: 1146 Table 'manh_mcdev.lingotek_metadata' doesn't exist" reported in logs.
Here's the exact error message. going to continue looking into this. Based on the update hook number, I think this is a 8.x.1.x issue. I think the site db I'm working had previously updated the code, but the update hook never processed completely. The lingotek_temporary_content_metadata table exists already.
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'hash' cannot be null: INSERT INTO {lingotek_temporary_content_metadata} (entity_type, entity_id, [error]
document_id, hash, profile, translation_source, translation_status) 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); Array
(
[:db_insert_placeholder_0] => node
[:db_insert_placeholder_1] => 6566
[:db_insert_placeholder_2] => 0bb5fa44-0f47-4ca5-a9a3-5bc139176b34
[:db_insert_placeholder_3] =>
[:db_insert_placeholder_4] =>
[:db_insert_placeholder_5] =>
[:db_insert_placeholder_6] =>
{"en":"CURRENT","en-au":"REQUEST","en-gb":"REQUEST","en-in":"REQUEST","en-nl":"REQUEST","fr":"CURRENT","nl":"CURRENT","es":"CURRENT","zh-hans":"CURRENT","ja":"CURRENT","nl-be":"REQUEST","en-hk":"REQUEST","en-id":"REQUEST","en-nz":"REQUEST","en-sg":"REQUEST","en-za":"REQUEST","en-ae":"REQUEST","fi":"REQUEST","hu":"REQUEST","is":"REQUEST","de":"REQUEST","it":"REQUEST","pt-br":"REQUEST","ms-my":"REQUEST","nb":"REQUEST","pl":"REQUEST","pt-pt":"REQUEST","ro":"REQUEST","ru":"REQUEST","es-es":"REQUEST","es-pa":"REQUEST","sv":"REQUEST","th":"REQUEST"}
)Performing lingotek_update_8011 [ok]
Failed: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'hash' cannot be null: INSERT INTO {lingotek_temporary_content_metadata} (entity_type, [error]
entity_id, document_id, hash, profile, translation_source, translation_status) 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); Array
(
[:db_insert_placeholder_0] => node
[:db_insert_placeholder_1] => 6566
[:db_insert_placeholder_2] => 0bb5fa44-0f47-4ca5-a9a3-5bc139176b34
[:db_insert_placeholder_3] =>
[:db_insert_placeholder_4] =>
[:db_insert_placeholder_5] =>
[:db_insert_placeholder_6] =>
{"en":"CURRENT","en-au":"REQUEST","en-gb":"REQUEST","en-in":"REQUEST","en-nl":"REQUEST","fr":"CURRENT","nl":"CURRENT","es":"CURRENT","zh-hans":"CURRENT","ja":"CURRENT","nl-be":"REQUEST","en-hk":"REQUEST","en-id":"REQUEST","en-nz":"REQUEST","en-sg":"REQUEST","en-za":"REQUEST","en-ae":"REQUEST","fi":"REQUEST","hu":"REQUEST","is":"REQUEST","de":"REQUEST","it":"REQUEST","pt-br":"REQUEST","ms-my":"REQUEST","nb":"REQUEST","pl":"REQUEST","pt-pt":"REQUEST","ro":"REQUEST","ru":"REQUEST","es-es":"REQUEST","es-pa":"REQUEST","sv":"REQUEST","th":"REQUEST"}
)
Comment | File | Size | Author |
---|---|---|---|
#10 | 2890026-upgrade-hash-null-7.only-tests.patch | 8.52 KB | penyaskito |
#10 | 2890026-upgrade-hash-null-7.patch | 9.01 KB | penyaskito |
|
Comments
Comment #2
jasonawantUpdate
This changes the db table column type to allow null values. What's the impact of allowing null hash values for this update process?
drush php-eval "db_change_field('lingotek_temporary_content_metadata', 'hash', 'hash', ['description' => 'The Lingotek hash.','type' => 'varchar','length' => 255, 'not null' => FALSE,]);"
Comment #3
penyaskitoAdded related issues:
Comment #4
penyaskitoComment #5
penyaskitoPatch + tests
Comment #9
penyaskitoOops wrong version.
Comment #10
penyaskitoRe-uploading same patches.
Comment #12
penyaskitoTests passed and failed as expected.
Comment #14
penyaskitoCommitted f9ad0b4 and pushed to 8.x-2.x. Thanks!
Comment #15
jasonawantHi,
I'm still experience this issue for the reasons explained in related issue comment > https://www.drupal.org/node/2889971#comment-12147239
Comment #16
jasonawantUpdating, back to fixed.