Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292776

Content Types are not getting migrated: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'severity' cannot be null: INSERT INTO {watchdog}

$
0
0

I recently tried to migrate our site in Drupal 7 to Drupal 8 via Drupal Migration UI available in Core. The Drupal version used 8.7.6. The migration crashed midway. On seeing the content created, there were no node type set. There were no content types created as well. Tried migrating 3 times after restoring database back, same results.

I then tried to see if I could make some changes post migration crash in the command line. I executed the command drush mim d7_node_type. The command did not succeed and threw exception. Please find them below.

I have migrated 3 sites till now from D7 to D8. Do let me know if additional details are required or if there is a workaround.

Prompt:/var/www/drupal8$ drush mim d7_node_type    PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'severity' cannot be null in    [error]   /var/www/drupal8/core/lib/Drupal/Core/Database/Statement.php:59  Stack trace:    
#0 /var/www/drupal8/core/lib/Drupal/Core/Database/Statement.php(59):    PDOStatement->execute(Array)    
#1 /var/www/drupal8/core/lib/Drupal/Core/Database/Connection.php(631):  Drupal\Core\Database\Statement->execute(Array, Array)  
#2 /var/www/drupal8/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(358):  Drupal\Core\Database\Connection->query('INSERT INTO {wa...', Array, Array)  
#3 /var/www/drupal8/core/lib/Drupal/Core/Database/Driver/mysql/Insert.php(32):   Drupal\Core\Database\Driver\mysql\Connection->query('INSERT INTO {wa...', Array, Array)   
#4 /var/www/drupal8/core/modules/dblog/src/Logger/DbLog.php(78):    Drupal\Core\Database\Driver\mysql\Insert->execute()   
#5 /var/www/drupal8/core/modules/dblog/src/Logger/DbLog.php(103):   Drupal\dblog\Logger\DbLog->log(NULL, Object(Drupal\Core\StringTranslation\PluralTranslatableMarkup), Array)    
#6 /var/www/drupal8/core/lib/Drupal/Core/Logger/LoggerChannel.php(127):  Drupal\dblog\Logger\DbLog->log(NULL, Object(Drupal\Core\StringTranslation\PluralTranslatableMarkup), Array)    
#7 /var/www/drupal8/modules/contrib/migrate_tools/src/DrushLogMigrateMessage.php(25):   Drupal\Core\Logger\LoggerChannel->log(NULL, Object(Drupal\Core\StringTranslation\PluralTranslatableMarkup))    
#8 /var/www/drupal8/modules/contrib/migrate_tools/src/MigrateExecutable.php(278):   Drupal\migrate_tools\DrushLogMigrateMessage->display(Object(Drupal\Core\StringTranslation\PluralTranslatableMarkup))  
#9 /var/www/drupal8/modules/contrib/migrate_tools/src/MigrateExecutable.php(239):   Drupal\migrate_tools\MigrateExecutable->progressMessage()  
#10 [internal function]:  Drupal\migrate_tools\MigrateExecutable->onPostImport(Object(Drupal\migrate\Event\MigrateImportEvent), 'migrate.post_im...',   Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))    
#11  /var/www/drupal8/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111):  call_user_func(Array, Object(Drupal\migrate\Event\MigrateImportEvent), 'migrate.post_im...',  Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))    
#12 /var/www/drupal8/core/modules/migrate/src/MigrateExecutable.php(279):    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('migrate.post_im...',    Object(Drupal\migrate\Event\MigrateImportEvent))  
#13 /opt/drush-8.x/vendor/drush/drush/includes/drush.inc(720): Drupal\migrate\MigrateExecutable->import()  
#14 /opt/drush-8.x/vendor/drush/drush/includes/drush.inc(711): drush_call_user_func_array(Array, Array)    
#15 /var/www/drupal8/modules/contrib/migrate_tools/migrate_tools.drush.inc(326):  drush_op(Array)  
#16 [internal function]: _drush_migrate_tools_execute_migration(Object(Drupal\migrate\Plugin\Migration), 'd7_node_type',  Array)  
#17 /var/www/drupal8/modules/contrib/migrate_tools/migrate_tools.drush.inc(281):  array_walk(Array, '_drush_migrate_...', Array)  
#18 /opt/drush-8.x/vendor/drush/drush/includes/command.inc(422): drush_migrate_tools_migrate_import('d7_node_type')   
#19 /opt/drush-8.x/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)    
#20 /opt/drush-8.x/vendor/drush/drush/includes/command.inc(199): drush_command('d7_node_type')    
#21 /opt/drush-8.x/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)  
#22 /opt/drush-8.x/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()   
#23 /opt/drush-8.x/vendor/drush/drush/drush.php(12): drush_main()  
#24 {main}   Next Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1048    Column 'severity' cannot be null: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer,   hostname, timestamp) 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); Array  (   [:db_insert_placeholder_0] => 0  [:db_insert_placeholder_1] => migrate_tools  [:db_insert_placeholder_2] => Drupal\Core\StringTranslation\PluralTranslatableMarkup Object   (   [count:protected] => 0   [translatedString:protected] => Processed 1 item (@created created, @updated updated, @failures failed, @ignored  ignored) - done with '@name'Processed @numitems items (@created created, @updated updated, @failures failed, @ignored    ignored) - done with '@name'  [translatedMarkup:protected] =>  [options:protected] => Array  (   )  [stringTranslation:protected] => Drupal\Core\StringTranslation\TranslationManager Object  (   [translators:protected] => Array    (   [30] => Array   (   [0] => Drupal\Core\StringTranslation\Translator\CustomStrings Object  (   [settings:protected] => Drupal\Core\Site\Settings Object  (   [storage:Drupal\Core\Site\Settings:private] => Array  (   [hash_salt] =>  kvhlb9NTNJ8JP5voIuHYcjavLbDFOO3x5oSlpJWceAbXiX20DaM9O_tWkVOSwFZogoAMymdWHQ  [update_free_access] =>  [file_private_path] => /srv/www/private/example  [container_yamls] => Array   (   [0] =>  /var/www/drupal8/sites/default/services.yml   )  [trusted_host_patterns] => Array    (   [0] => ^example\.net$  [1] => ^.+\.example\.net$  )  [file_scan_ignore_directories] => Array  (   [0] => node_modules  [1] => bower_components  )  [entity_update_batch_size] => 50    [entity_update_backup] => 1  )  [_serviceId] => settings    )  [translations:protected] => Array   (   [en] => Array   (   )  )  [_serviceIds:protected] => Array    (   )  [_entityStorages:protected] => Array    (   )  [_serviceId] => string_translator.custom_strings  )  )  )  [sortedTranslators:protected] => Array  (   [0] => Drupal\Core\StringTranslation\Translator\CustomStrings Object  (   [settings:protected] => Drupal\Core\Site\Settings Object  (   [storage:Drupal\Core\Site\Settings:private] => Array  (   [hash_salt] =>    kvhlb9NTNJ8JP5voIuHYcjavLbDFOO3x5oSlpJWceAbXiX20DaM9O_tWkVOSwFZogoAMymdWHQ   [update_free_access] =>  [file_private_path] => /srv/www/private/example  [container_yamls] => Array   (   [0] =>    /var/www/drupal8/sites/default/services.yml    )  [trusted_host_patterns] => Array    (   [0] => ^example\.net$  [1] => ^.+\.example\.net$  )  [file_scan_ignore_directories] => Array  (   [0] => node_modules  [1] => bower_components  )  [entity_update_batch_size] => 50    [entity_update_backup] => 1  )  [_serviceId] => settings    )  [translations:protected] => Array   (   [en] => Array   (   )  )  [_serviceIds:protected] => Array    (   )  [_entityStorages:protected] => Array    (   )  [_serviceId] => string_translator.custom_strings  )  )  [defaultLangcode:protected] => en   [_serviceId] => string_translation  )  [string:protected] => Processed 1 item (@created created, @updated updated, @failures failed, @ignored ignored)   - done with '@name'Processed @numitems items (@created created, @updated updated, @failures failed, @ignored ignored) -  done with '@name'   [arguments:protected] => Array  (   [@numitems] => 0  [@created] => 0  [@updated] => 0  [@failures] => 0  [@ignored] => 0  [@name] => d7_node_type  )  )  [:db_insert_placeholder_3] => a:0:{}    [:db_insert_placeholder_4] =>   [:db_insert_placeholder_5] =>   [:db_insert_placeholder_6] => http://default/   [:db_insert_placeholder_7] =>   [:db_insert_placeholder_8] => 127.0.0.1  [:db_insert_placeholder_9] => 1566801311    )    in /var/www/drupal8/core/lib/Drupal/Core/Database/Connection.php:689   Stack trace:    
#0 /var/www/drupal8/core/lib/Drupal/Core/Database/Connection.php(656):  Drupal\Core\Database\Connection->handleQueryException(Object(PDOException), 'INSERT INTO {wa...', Array, Array)   
#1 /var/www/drupal8/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(358):  Drupal\Core\Database\Connection->query('INSERT INTO {wa...', Array, Array)  
#2 /var/www/drupal8/core/lib/Drupal/Core/Database/Driver/mysql/Insert.php(32):   Drupal\Core\Database\Driver\mysql\Connection->query('INSERT INTO {wa...', Array, Array)   
#3 /var/www/drupal8/core/modules/dblog/src/Logger/DbLog.php(78):    Drupal\Core\Database\Driver\mysql\Insert->execute()   
#4 /var/www/drupal8/core/modules/dblog/src/Logger/DbLog.php(103):   Drupal\dblog\Logger\DbLog->log(NULL, Object(Drupal\Core\StringTranslation\PluralTranslatableMarkup), Array)    
#5 /var/www/drupal8/core/lib/Drupal/Core/Logger/LoggerChannel.php(127):  Drupal\dblog\Logger\DbLog->log(NULL, Object(Drupal\Core\StringTranslation\PluralTranslatableMarkup), Array)    
#6 /var/www/drupal8/modules/contrib/migrate_tools/src/DrushLogMigrateMessage.php(25):   Drupal\Core\Logger\LoggerChannel->log(NULL, Object(Drupal\Core\StringTranslation\PluralTranslatableMarkup))    
#7 /var/www/drupal8/modules/contrib/migrate_tools/src/MigrateExecutable.php(278):   Drupal\migrate_tools\DrushLogMigrateMessage->display(Object(Drupal\Core\StringTranslation\PluralTranslatableMarkup))  
#8 /var/www/drupal8/modules/contrib/migrate_tools/src/MigrateExecutable.php(239):   Drupal\migrate_tools\MigrateExecutable->progressMessage()  
#9 [internal function]:  Drupal\migrate_tools\MigrateExecutable->onPostImport(Object(Drupal\migrate\Event\MigrateImportEvent), 'migrate.post_im...',   Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))    
#10  /var/www/drupal8/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111):  call_user_func(Array, Object(Drupal\migrate\Event\MigrateImportEvent), 'migrate.post_im...',  Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))    
#11 /var/www/drupal8/core/modules/migrate/src/MigrateExecutable.php(279):    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('migrate.post_im...',    Object(Drupal\migrate\Event\MigrateImportEvent))  
#12 /opt/drush-8.x/vendor/drush/drush/includes/drush.inc(720): Drupal\migrate\MigrateExecutable->import()  
#13 /opt/drush-8.x/vendor/drush/drush/includes/drush.inc(711): drush_call_user_func_array(Array, Array)    
#14 /var/www/drupal8/modules/contrib/migrate_tools/migrate_tools.drush.inc(326):  drush_op(Array)  
#15 [internal function]: _drush_migrate_tools_execute_migration(Object(Drupal\migrate\Plugin\Migration), 'd7_node_type',  Array)  
#16 /var/www/drupal8/modules/contrib/migrate_tools/migrate_tools.drush.inc(281):  array_walk(Array, '_drush_migrate_...', Array) 

Viewing all articles
Browse latest Browse all 292776

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>