When importing a value that is too long for the field a mysql error is raised and importing fails. Perhaps it would be better if the field mapper checked the incoming value against the length of the field and trimmed it to fit?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jamsilver’s picture

Assigned: jamsilver » Unassigned
Status: Needs work » Needs review
FileSize
694 bytes
1.04 KB

Patch attached.

emackn’s picture

Status: Needs review » Needs work

I poked this a bit and can't seem to get it working reliably. Also not sure I want to promote incomplete data being pulled into a feed. I feel it might be best to leave this as is for now.

MegaChriz’s picture

Category: Bug report » Support request
Issue summary: View changes
Status: Needs work » Fixed

I think this should fail an import. You can fix the problem by using the plugin "Truncate" from Feeds Tamper. When the patch from #2379631: field_attach_validate() must be called before programmatic entity saves gets committed, we'll get a better error message for this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.