Closed (fixed)
Project:
Drupal core
Version:
4.6.0
Component:
node.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2005 at 21:36 UTC
Updated:
14 Mar 2006 at 21:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
TDobes commented+1... I've encountered this bug using flexinode.
Comment #2
Steven commentedI 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.
Comment #3
dries commentedCommitted to HEAD. Does this need to be backported to DRUPAL-4-6? I'd think so.
Comment #4
Steven commentedIndeed Dries, I just committed it to 4-6.
Comment #5
(not verified) commentedComment #6
Tommy Sundstrom commentedThis problem seams to be back.
The node_example.module (from http://drupaldocs.org/api/head/file/contributions/docs/developer/example... ) works properly in Drupal 4.6 (ie will allow me to create new nodes) but not in the CVS version (8 sept 2005).
Comment #7
dopry commentedIssue was closed in 4.6. Do not reopen against 4.6 when the bug reoccurs in CVS.
I'm fairly certain this is fixed in CVS.