With this module, a page title is always created based on the node type for the last form processed by hook_form_alter() in a page. However, there may be multiple nodes in a single page, and there may be forms on a page that have a different node type than the 'main' node of interest, and so this functionality needs to be optional. This is a bug because it will produce an incorrect situation: the title for a page will be set by _option_nfs_title_create() even if the node type it uses isn't the main node of interest.
Here's a specific situation:
The Node Comments module lets you pick any sort of node to act as a comment; a comment becomes a full (CCK) node. When you view a node that has comments, first the node is rendered, and then the comments (if any) are rendered, and then a comment form -- which is a type of node form -- is rendered. Thus the last thing run thru hook_form_alter() is the comment form.
nodeformsettings_form_alter(..) calls the function _option_nfs_title_create(...) which then uses drupal_set_title(check_plain($title)) to create the title for the page. In this case, $title = "Create Comments" (where 'Comments' = the full CCK content type you're using to replace the default Drupal comment info, and is the node type for the 'create a comment' form), so the page title is set to "Create Comments" even though you're viewing a node (which can be of some other type).
IOW, to reproduce this, install the Node Comments module and watch what happens.
The Node Comments module creates one specific error condition, but there are surely others. Any time you have one node type and a form with a different node type on a page you're going to have this condition.
Issue #1182192: Page titles should be optional, not required. suggests this as a task, but this is a bug: it causes incorrect behavior. Much of the code in the patch for #1182192: Page titles should be optional, not required. looks like it will fix this. (Some of the patch is clearly dealing with t(), but the rest of the logic looks good for this.)
Comments
Comment #1
ss81 commented+1. It's really bad feature of this module.