Cannot import multiple-valued field if spread out over multiple columns
| Project: | Node import |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
I have a field that has multiple values, but comes from multiple columns. So instead of having, for example:
A||B||C
in one column, I have three columns that has values A, B, and C respectively.
In some cases the content of the columns are empty, and that means that subsequent columns do not get imported. For example, if I have the first two columns blank, and the last column set to 'C', 'C' never gets imported.
I found the problem--in that the array with the data gets filtered. But the indices for that array remain the same. But when the data gets transferred from 'cck:fieldname:value' in $values into 'fieldname' for node import, it references the indices based on the number of items, not the actual array keys.
In node_import.inc I see the input value array gets culled twice-- I don't know if that is on purpose (line 637, and 678). In any case, I re-index the array. Included is a patch for testing.
| Attachment | Size |
|---|---|
| node_import.patch | 591 bytes |
