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?...

Comments

bsdunx’s picture

StatusFileSize
new900 bytes

Correct 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"));
$

ronan’s picture

Thanks, nice find. I'll check and apply the patch as soon as I get a chance.

r

bsdunx’s picture

Sweet 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.

dgorton’s picture

Status: Needs review » Closed (fixed)

Yikes - this was fixed ages ago - closing the ticket