During a migration of a node reference from D6 to D7 I got this error but there was only one value on the source.

Field validation error for field_event: Event: this field cannot hold more than 1 values.

Debugging I found \DrupalVersion6::getSourceValues

Was storing the single value in an array here:

Line 303:

if (isset($row->$index) && !is_array($row->$index)) {
                    $row->$index = array($row->$index);
                  }

Then again here:
Line 319:

  elseif (isset($field_row->$column_name)) {
                    $row->{$index}[] = $field_row->$column_name;
                  }
CommentFileSizeAuthor
#2 2846894-2.patch727 bytesjoelpittet

Comments

joelpittet created an issue. See original summary.

joelpittet’s picture

Status: Active » Needs review
StatusFileSize
new727 bytes

I'm not sure my logic is 100% because there isn't any comments around what is intended but I've wrote some comments on what I see with the fix.