I have export all 'move' node types with drush
drush node-export-export --type=move --file=move.txt

I delete all nodes of this type
drush delete-all

And now I am trying to import again the nodes back to the same site
drush node-export-import --file=move.txt

array_pop() expects parameter 1 to be array, boolean given computed_field.module(394) : eval()'d code:2                                                                                               [warning]
array_pop() expects parameter 1 to be array, null given computed_field.module(394) : eval()'d code:2                                                                                                  [warning]

The node type 'move' has 9 decimal type fields, 2 entity reference and 1 computed field with these settings
Values: 1
Computed Code (PHP):

$move_type =  array_pop(array_pop(field_get_items($entity_type, $entity, 'field_type')));
$move_cash = array_pop(array_pop(field_get_items($entity_type, $entity, 'field_paycash')));
if ( ! $move_cash >= 0) { $move_cash = 0;}
if ($move_type === '1' ) { 
$move_cash = 0 - $move_cash;
}
$entity_field[0]['value'] = $move_cash;

Display Code (PHP):

$display_output = $entity_field_item['value'];

Store value in the database: True
Database Storage Settings: Decimal
Index computed values in the database: True

Comments

redhatusr created an issue. See original summary.

redhatusr’s picture

Issue summary: View changes
redhatusr’s picture

Category: Bug report » Support request
Priority: Major » Normal
redhatusr’s picture

Issue summary: View changes
redhatusr’s picture

Status: Active » Closed (works as designed)