When creating a node type, Drupal says: « Underscores will be converted into hyphens when constructing the URL of the create content page. »

But in the Workspace module, the "Add new item" form, just passes the $node_type without converting "underscores" into "hyphens". Resulting a blank page.

This patch corrects this issue. 1 line changed !

     if (isset($options[$node_type])) {
-      drupal_goto('node/add/' . $node_type);
+      drupal_goto('node/add/' . str_replace('_', '-', $node_type));
     }
CommentFileSizeAuthor
workspace.patch448 bytesMichel Poulain

Comments

Michel Poulain’s picture

To be more precise...

The actual node add url with Workspace :
example.com/node/add/node_type [WRONG]

With this patch :
example.com/node/add/node-type [GOOD]

frank ralf’s picture

Status: Patch (to be ported) » Closed (duplicate)

Duplicate of #344585: "Add new item" feature produces bad URLs for CCK content types. Please follow that thread, thanks.