I am using the media_mover module. I added some debug code to media_mover's hook_nodeapi:

function media_mover_api_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  dsm ("entering hook_nodeapi.  op=$op");
  switch ($op) {
    case 'update':

When the user edits and saves a node, hook_nodeapi is getting called twice with $op='update'. Anyone know why this might be?

If media_mover calls node_save during the process of saving the updated node, might that cause hook_nodeapi to be called multiple times with $op='update'?

(I am using Drupal-6.x)

2 Answers 2


You are spot on.

If a module calls node_save, nodeapi will be called either with update or insert, depending on what happened.


There is a chance to call hook_node_update multiple times if you use field collection items in your content type. The call times depends on the content in the field collection items

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.