[drupal-devel] [bug] node_invoke_nodeapi recursion

Iluvatar drupal-devel at drupal.org
Sat Sep 17 13:04:33 UTC 2005


Issue status update for 
http://drupal.org/node/31466
Post a follow up: 
http://drupal.org/project/comments/add/31466

 Project:      Drupal
 Version:      cvs
 Component:    module system
 Category:     bug reports
 Priority:     critical
 Assigned to:  Anonymous
 Reported by:  Iluvatar
 Updated by:   Iluvatar
 Status:       patch (code needs review)
 Attachment:   http://drupal.org/files/issues/node.module_12.patch (696 bytes)

I have had some weird problems, most of them involving hook_nodeapi. It
is difficult to explain. For one of the problems see my comment at
http://drupal.org/node/27007#comment-42637.


Another problem was that I broke the upload module, by calling
node_load in hook_nodeapi($op = 'validate') in some module. This caused
node_invoke_nodeapi to be called recursively, which doesn't work as
expected because of the caching that module_implements does.


Sorry, I know all of this is kind of vague, but I can't explain it any
better. You can take a look at my patch how I solved the problem. I
think this patch does not have any impact on performance, and to
prevent unexpected behavior involving hook_nodeapi this patch should be
committed. If this patch is committed, a comment should be added to the
code so that future developers will not change it back.




Iluvatar




More information about the drupal-devel mailing list