Howdy, when node.module calls invoke_nodeapi() with param $op='settings', the 2nd parameter is a string that is the node type module's name.

However, when I look at the source HTML for the form generated at q='admin/node/configure/types/blog', the form contains variable names like 'comment_' and 'node_options_' rather than 'comment_blog' and 'node_options_blog'.

The problem is that the function node_types_configure() passes $type rather than a $node with a $node->type field. The way comment_nodeapi() and node_nodeapi() are coded for param $op='settings' show that those two functions expect an object with a 'type' field (i.e., $node w/ $node->type, rather than just passing $type).

I have a patch here that addresses the issue, but I'm not sure whether you guys want to change the way comment_nodeapi() and node_nodeapi() are written, or whether you want to do it this way (or something similar to this way).

-Ankur

CommentFileSizeAuthor
#1 node.module_0.diff905 bytesankur
node.module.diff496 bytesankur

Comments

ankur’s picture

StatusFileSize
new905 bytes

Sincerest apologies for the second post here, but I forgot to include a fix to the menu functions to accomodate the change I made to the node_types_configure() function. In short, I changed node_menu() so that the menu item for q=admin/node/configure/type/arg(4) also includes 'callback arguments' => arg(4) since node_types_configure() is expecting a $type as the param it hopes to pass on (somehow) to hook_nodeapi() for $op='settings'.

drumm’s picture

I believe this will be fixed with http://drupal.org/node/16192.

drumm’s picture

Confirmed that is is fixed with another patch.