Dev date 2010-Jul-11
I'm importing data and one of the fields is a CCK Textfield Textarea with Multiple values. Fails on line 554 in node_import.admin.inc because $values['map'][$fieldname] is only checked as a string. Multi-CCK field values return array.
I don't know if this is the best solution but its what got me by.
Line 554 node_import.admin.inc
$isEmpty = FALSE;
switch(gettype($values['map'][$fieldname]))
{
case 'string': $isEmpty = strlen($values['map'][$fieldname]) == 0; break;
case 'array': $isEmpty = strlen(implode(",", $values['map'][$fieldname])) == 0; break;
}
if ($fieldinfo['map_required'] && $isEmpty) {
Comments
Comment #1
okletsgo commentedComment #2
mediabounds commentedI ran across this same issue today and instead patched it by simply checking if the value was an array before checking the string length; I'm making the assumption that if the value is an array then it is not empty.
Comment #3
fzipi commentedPatch from [#2] worked for me!