When one navigates to a parent nodes children tab, you get brought to the listing of child nodes. At the bottom the link to create more incorrectly uses the machine-readable name of the content type in the link.
ex. http://site/node/add/child_node?...
as opposed to
http://site/node/add/child-node?...
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | nodehierarchy_theme_link-1.patch | 900 bytes | bsdunx |
| nodehierarchy_theme_link.patch | 747 bytes | bsdunx |
Comments
Comment #1
bsdunx commentedCorrect an oversight in my patch, and backup my claim.
Drupal core does;
$ grep "'_', '-'" modules/*/*
modules/book/book.module: 'href' => "node/add/". str_replace('_', '-', $child_type),
modules/forum/forum.module: $forum_types[$type] = array('title' => t('Post new @node_type', array('@node_type' => node_get_types('name', $type))), 'href' => 'node/add/'. str_replace('_', '-', $type) .'/'. $variables['tid']);
modules/node/content_types.inc: $type_url_str = str_replace('_', '-', $type->type);
modules/node/content_types.inc: $form_state['redirect'] = 'admin/content/node-type/'. str_replace('_', '-', $type->old_type) .'/delete';
modules/node/node.module: $type_url_str = str_replace('_', '-', $type->type);
modules/translation/translation.pages.inc: $options[] = l(t('add translation'), 'node/add/'. str_replace('_', '-', $node->type), array('query' => "translation=$node->nid&language=$language->language"));
$
Comment #2
ronan commentedThanks, nice find. I'll check and apply the patch as soon as I get a chance.
r
Comment #3
bsdunx commentedSweet it's always nice to post a patch on your birthday and have it promptly reviewed by the maintainer. =p I'll see if I can find some issues in the queue to hammer out also.
Comment #4
dgorton commentedYikes - this was fixed ages ago - closing the ticket