Error is warning: Invalid argument supplied for foreach() in /sites/all/modules/node_convert/node_convert.module on line 625.

looking at node_convert_convert_nodes_using_template() and printing out $template shows that currently there is this:

$result = node_convert_node_convert($node->nid, $template['destination_type'], $template['fields']['source'], $template['fields']['destination'], $template['data']['no_fields'], $template['data']['hook_options']);

when it should be:
$result = node_convert_node_convert($node->nid, $template['destination_type'], $template['data']['fields']['source'], $template['data']['fields']['destination'], $template['data']['no_fields'], $template['data']['hook_options']);

CommentFileSizeAuthor
#3 data_array_fix.patch1.83 KBnohup
#1 convert_template_fix.patch1.22 KBbitman

Comments

bitman’s picture

StatusFileSize
new1.22 KB

I experience the same error. When converting with a template, it is unable to convert between different fields, discards the data in those fields, and produces this warning.

I've created a patch from the fix izaiah describes above, which I have tested with a text field. It resolves the warning and the data is converted as intended.

bitman’s picture

Status: Active » Needs review
nohup’s picture

StatusFileSize
new1.83 KB

The attached patch fixes the problem with node convert action along with the original issue.

alcroito’s picture

Status: Needs review » Fixed

Thanks, fixed in DEV.

Status: Fixed » Closed (fixed)

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