| Project: | Create from Web |
| Version: | 6.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
After clicking the "create" from the results section, I am brought to the /node/add/node_type url, which simply shows the normal "create content" screen with all the node types to choose from.
After thinking and looking around, I found http://drupal.org/node/357567, which appears to be a similar problem, where the node/add URL interface adds a '-' instead of an '_' to any node types.
I think a different format of the node type string should be used in eg createfromweb.module in createfromweb_new_node_preview:
$node_type = isset($_SESSION['createfromweb_nodetype']) ? $_SESSION['createfromweb_nodetype'] : 'page';// = $form_state['values']['nodetype'];
$form_id = $node_type."_node_form";
//original=bad : $gotourl = 'node/add/'.$node_type;
$gotourl = 'node/add/'.str_replace('_', '-', $node_type);This is along the lines of the "fix" from the referenced issue, whereas I would think there might be a better idea in how to get the URL for adding a node of the given node type. As a side note, does this gotourl approach work for the "non-clean URLs" ?