[drupal-devel] [bug] "Create content" menu displays extraneous links
Steven
drupal-devel at drupal.org
Wed May 25 07:04:41 UTC 2005
Issue status update for http://drupal.org/node/18275
Project: Drupal
Version: cvs
Component: node.module
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: JonBob
Updated by: Steven
Status: patch
Attachment: http://drupal.org/files/issues/node types.patch (621 bytes)
I don't think your patch is correct. If you use it, the simple modules
(blog, story, page) no longer have a link on the node add page.
There are two possibilities:
- Module implements hook_node_name(). The node type is the module name.
- Module implements hook_node_name() and hook_node_types(). The node
types are returned from the latter as an array.
If hook_node_types() returns an empty array (like flexinode), the if
clause evaluates to false, and a simple module-named node type is
assumed instead.
IMO the fix is the change the if() to is_array(). Patch attached.
Steven
Previous comments:
------------------------------------------------------------------------
March 2, 2005 - 23:36 : JonBob
Attachment: http://drupal.org/files/issues/node_30.patch (509 bytes)
In the case where a node module defines no node types, like Flexinode or
CCK when no types have yet been defined, the node/add menu displays
links that do not work. One-line fix attached.
------------------------------------------------------------------------
March 29, 2005 - 12:26 : TDobes
+1... I've encountered this bug using flexinode.
More information about the drupal-devel
mailing list