Closed (fixed)
Project:
Migrate
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2012 at 08:07 UTC
Updated:
5 Apr 2015 at 23:40 UTC
Jump to comment: Most recent
When sourceMigration specified for field mapping and there's no data in source migration,
handleSourceMigration return empty array instead of NULL
so field storage tries to insert '' in field, when field in the table isn't varchar/text
SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column *
in field_sql_storage_field_storage_write() (line 448 of modules/field/modules/field_sql_storage/field_sql_storage.module).
In this case, nothing should be recorded in this field
If you want to set some value in case of empty, you just can use defaultValue method
Patch attached
Waiting for your feedback.
| Comment | File | Size | Author |
|---|---|---|---|
| migrate-source-migration-empty-value.patch | 386 bytes | chingis |
Comments
Comment #1
chingis commentedComment #2
mikeryanCommitted (with a similar fix applied elsewhere), thanks.
Comment #4
tmetzger commentedYES! That tiny patch fixed my issue. Thanks very much!
Tom
Comment #5
summit commentedHi,
I do not know if I need to open this again...but I got these errors also with latest 7.2.dev..
greetings, Martijn