I now have 3 custom modules, and each one a nodeapi function, each one has a different name

in fashion.module I have fashion_nodeapi(&$node, $op, $teaser, $page)
in feature.module I have feature_nodeapi(&$node, $op, $teaser, $page)
in slideshow.module I have slideshow_nodeapi(&$node, $op, $teaser, $page)

and each one contains switch ($op) with case 'insert'; and case 'update';

the problem is when I create a new node with one module, it exectues the code from the 'insert' case in ALL 3 MODULES!!!!!!

why is that? and how can I stop it? I figured since each module has it's own nodeapi function with a different name there shouldn't be this kind of cross talk between the different modules

thanks in advance for any help with this!

Comments

dman’s picture

:)

That's normal behaviour!
hook_nodeapi is for code you want to run every time anything is done to any node type.
It's used for adding features, not defining nodes.
Act on nodes defined by other modules

I think you wanted hook_insert()

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/