This is a small one, but it required me to dig through source code to determine when hook_nodeapi would be invoked with 'insert' as the $op. The docs say

"insert": The node is being created (inserted in the database).

That's misleading I think though, because as far as I can tell it's actually invoked *after* the node has been inserted. Since this is exactly what I was trying to find - when I could examine the node after it's been created and fully initialized - I think the distinction is important enough to file this note...at least, maybe it would save some other developer some source digging in the future.

Thanks,

M

Comments

jhodgdon’s picture

Status: Active » Closed (duplicate)

This is a duplicate of another issue #629518: hook_node_insert() and other node hooks have imprecise/misleading descriptions. When that issue is fixed in Drupal 7, Drupal 6 will then be addressed.