I have a MigrateSourceSQL/MigrateDestinationNode migration to import new and update old content on a site.
It was working fine for years and now it misbehaves badly
What's changed:
drush 8 (was 6 then 7)
migrate 2.8 (from very old 2.x)
drupal 7.43 (was 7.2x)
I used to run 'drush mi XXX --update' before but now it looks like this:
drush @somesite mi PartNode --limit='1 item' --update
Drush command terminated abnormally due to an unrecoverable error.
That's it, no migrate messages, no WD entries, no PHP errors.
Running the same command with --debug produces this:
...
Found command: migrate-import (commandfile=migrate) [1.07 sec, 39.49 МБ] [bootstrap]
Calling hook drush_migrate_import_validate [1.21 sec, 42.4 МБ] [debug]
Returned from hook drush_migrate_import_validate [1.21 sec, 42.4 МБ] [debug]
Calling hook drush_migrate_pre_migrate_import [1.21 sec, 42.41 МБ] [debug]
Returned from hook drush_migrate_pre_migrate_import [1.21 sec, 42.41 МБ] [debug]
Calling hook drush_migrate_import [1.21 sec, 42.43 МБ] [debug]
Importing 'PartNode' migration [1.22 sec, 43.12 МБ] [notice]
WD node: MigrateException: Cannot modify header information - headers already sent by (output started at [error]
/opt/tools/drush/8/drush/includes/output.inc:40)
File /.../includes/common.inc, line 705 in MigrationBase->errorHandler() (line 541 of
/.../sites/all/modules/migrate/includes/base.inc). [1.47 sec, 56.51 МБ]
Cannot modify header information - headers already sent by (output started at /opt/tools/drush/8/drush/includes/output.inc:40) [error]
File /.../includes/common.inc, line 705 [1.47 sec, 56.51 МБ]
Processed 1 (0 created, 0 updated, 1 failed, 0 ignored) in 0.3 sec (231/min) - done with 'PartNode' [1.48 sec, 56.51 МБ] [completed]
Returned from hook drush_migrate_import [1.48 sec, 56.42 МБ] [debug]
Command dispatch complete [1.48 sec, 56.37 МБ] [notice]
Timer Cum (sec) Count Avg (msec)
page 1.012 1 1011.86
The node is actually updated in this case although Migrate counts it as failed.
I was trying to debug this by adding $this->saveMessage(print_r($current_row), Migration::MESSAGE_INFORMATIONAL) to prepare()/prepareRow() and in that case everything is the same as with --debug except for where "the headers already sent".
Comments