I get the following error when using Migrate/Migrate D2D on Drupal 7. I was trying to import nodes from my Drupal 6 site using the UI method. I am unable to continue with migration without this working.

I am using:
Migrate 7.x-2.8
Drupal-to-Drupal migration 7.x-2.1

Source Drupal v6.16 and also tested on v6.38
Destination Drupal v7.43
PHP version: 5.6.20
MySQL version: 5.5.5

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /www/drupal7/batch?render=overlay&id=318&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[22007]: Invalid datetime format: 1292 Truncated incorrect DOUBLE value: '': UPDATE {migrate_status} SET highwater=:db_update_placeholder_0 WHERE (machine_name = :db_condition_placeholder_0) AND ((highwater+0) < :highwater) ; Array ( [:db_update_placeholder_0] => 1282067934 [:db_condition_placeholder_0] => f53297286Nodeproject [:highwater] => 1282067934 ) in MigrationBase->saveHighwater() (line 820 of /opt/lampp/htdocs/www/drupal7/sites/all/modules/migrate/includes/base.inc).

Comments

Zythyr created an issue. See original summary.

mikeryan’s picture

Title: SQLSTATE[22007]: Invalid datetime format: 1292 Truncated incorrect DOUBLE value: '': UPDATE {migrate_status} » Truncated incorrect DOUBLE value message with highwater
Version: 7.x-2.8 » 7.x-2.x-dev
Component: migrate_ui » Code
Priority: Critical » Major

The problem here is with

// CAST(highwater AS INTEGER) would be ideal, but won't
// work in MySQL. This hack is thought to be portable.
$query->where('(highwater+0) < :highwater', array(':highwater' => $highwater));

The hack is not so portable after all - the highwater column is a varchar, and it seems that MySQL has become pickier about automatically casting varchars to ints than when this was initially implemented. So, we probably need to do the same sort of CASE WHEN highwater='' THEN 0 thing the pgsql case is doing. I don't have time to test that out at this time, but for those facing this problem you can do:

  1. UPDATE migrate_status SET highwater=0 WHERE highwater='' AND machine_name='migration_machine_name' (preferred), or
  2. Remove the +0 from the above line (should work where your only highwaters are timestamps since (Mike checks http://www.epochconverter.com/) Sun, 09 Sep 2001 01:46:40 GMT
Zythyr’s picture

Issue summary: View changes
Zythyr’s picture

Issue summary: View changes
nedjo’s picture