Closed (won't fix)
Project:
Drupal core
Version:
4.7.0
Component:
node system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2006 at 19:47 UTC
Updated:
27 May 2006 at 11:00 UTC
I have a module that defines 3 node types...a, b, and c for simplicity.
For all of these nodes, mymodule_a_load does not exist according to module_hook.
I have added this code to node.module:
print node_get_base($node) . '_' . $hook;
if(function_exists(node_get_base($node) . '_' . $hook)) { print "YES for $hook"; } else { print "NO for $hook"; }
the output is: mymodule_a_load NO for load mymodule_a_view YES for view mymodule_a_view YES for view
What this is telling me is that drupal doesn't think that mymodule_a_load exists...trust me, it does...I have the same problem for all 3 node types!?!?! Also, why is it running mymodule_a_view twice???
Any hints would be greatly appreciated!
Comments
Comment #1
dblado commentedI was able to workaround my issue by adding mymodule_a_load($node) in my view hook...not the cleanest, and probably not 'drupal' safe...but it seems to be working, so I'm gonna go with it :)
If anyone knows why my load hooks aren't working I'd love to hear!
Comment #2
chx commentedIt's extremely hard to understand what are you talking of. What the heck module_hook is supposed to be? There is no such thing.
Comment #3
dblado commentedHi Chx,
Let me try to explain better...
I have a module w/ 3 node types...none of the 3 node types receive a call to function mymodule_nodetype_load($node)
following the stack trace for node_load we get:
node.module - node_load()
node.module - node_invoke()
node.module - node_hook() - comments were my debugging additions
module.inc - module_hook() - for me this is returning false on mymodule_nodetype_load() calls
Comment #4
killes@www.drop.org commentedUse nodeapi