[development] &$node in nodeapi

luca capra luca.capra at gmail.com
Mon Oct 4 14:50:46 UTC 2010


Good evening,

I'm writing a custom module, with a call to hook_nodeapi (on php 5.3, 
latest drupal 6)
I update some cck fields, but looking at the saved node page, these 
fields are empty.

Seems that after the hook, cck fields lose their values.

function mymod_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL){
     switch($op){
        case "insert":
        case "update":

             my_fill_cck( &$node );

             // here cck are populated
             // krumo( $node );
         break;
         case "load":
             // viewing node, cck are empty :(
             // krumo( $node );
             return array();
         break;
     }
}

Any idea is really appreciated.
Thank in advance.

Best regards,
Luca


More information about the development mailing list