Hello, my friends
I have test Feeds importer many times "with article content type and custom importer"
every thing gone fine,
but one main problem, its bypass my custom hook_node_presave() function!
please help me to solve this problem!!
thanks and regards

Comments

math_1048’s picture

Fixed by change my custom module weight :)
Thanks and regards

math_1048’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

damienmckenna’s picture

Issue summary: View changes

For anyone else who comes across this, I found that hook_entity_presaved worked whereas hook_node_presave wasn't.

damienmckenna’s picture

Assigned: math_1048 » Unassigned
mooru’s picture

What variables are available via the $entity variable. Devel doesn't seem to be brining it out and some how the IDE too

math_1048’s picture

Hello,
I think you can use watchdog to log the output of $entity variable
ie
watchdog("watch entity variable value", print_r($entity,true));
hope its works with you.

megachriz’s picture

Something like this is what I use to inspect items for code that runs in the background:

file_put_contents('/tmp/output.txt', print_r($data, TRUE));

If you want to debug a Feeds import during runtime, you could also run the import programmatically:

$source = feeds_source($importer_id, $feed_nid)->existing();
$source->import();

Note: this code is not recommended to run for large imports as PHP could timeout.