There appears to be an error in the way media_mover uses hook_nodeapi. The documentation for hook_nodeapi says that the return on the "load" operation should be "an array containing pairs of fields => values to be merged into the node object." Yet media_mover.module:246 actually modifies the node object that is passed in and returns that. The effect of this is that the entire node then becomes a sub-field of the node. As you can imagine this causes problems for anyone who might want to iterate over the node fields.

This is exactly the problem that's triggered in the contemplate (content_template) module - as it tries to build up a representation of the node it eventually fails with "PHP Fatal error: Maximum function nesting level of '100' reached, aborting!"

This looks like it should be a pretty simple fix (hopefully not famous last words :-). I can provide a patch if I know which branch to roll it against. Should I do it against 5.x-0.3-1 or something else?

Comments

arthurf’s picture

Status: Active » Fixed

thanks for the catch! I've changed the functioning of nodeapi and committed it on the drupal-5 branch, please feel free to check it out.

Anonymous’s picture

Status: Fixed » Closed (fixed)