Convert using template fails because of missing source and destination array data
| Project: | Node Convert |
| Version: | 6.x-1.5 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
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']);

#1
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.
#2
#3
The attached patch fixes the problem with node convert action along with the original issue.