While messing about with Organic Groups, I noticed that in the list of group content, when Contento node types are used for OG group postings, that on the group home page, it lists the internal system name of the contento type, instead of the human-readable name.
Then, while fiddling with a module of my own that I'm working on, I found that getting a list of node types via node_get_types() gives an array where the key is the internal name of each node type, with the values set to the human-readable name of each node type... except for contento node types, which return the internal system name for both key and value.
CCK types return the expected labels, as do the normal drupal node types. It's just contento types that seem to be handing back the system name instead of the human-readable label. (I haven't tried it with Flexinode, as it is listed as deprecated).
Coyote
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | contento_type_list.patch.txt | 768 bytes | Tobias Maier |
Comments
Comment #1
Tobias Maier commentedthe same issue exists for node/add
the content-types get called by their internal names
Comment #2
Tobias Maier commentedi think i have a fix for it
BUT it is not tested only coded theoretically
because I'm at the university...
replace the contento_type_list() function with this one:
whats the problem:
hook_node_info()
asks that array('name') is the human readable name
but in our table this is the machine-name
so we have to replace it with 'label'
Comment #3
Tobias Maier commentedthe patch