I'm attempting my first module (a node-type) and following the example from the handbook, I'm getting some funny results. My new module shows up OK in the admin section for enabling and it also shows up in the navigation block OK under create content.
However, there are two big problems....
1) If I click on the link to create a new node, all I get is the Create Content help page, with the header changed from the text "create content" to my module name.
2) Even though I provided it in my module, when I originally bring up the create content page, no help text appears for my new node type
Here's my menu hook
/**
* Implementation of hook_menu().
* In order for users to be able to add nodes of their own, we need to give
* them a link to the node composition form here.
*/
function wishlist_menu($may_cache) {
$items = array();
if($may_cache) {
$items[] = array('path' => 'node/add/wishlist',
'title' => t('wishlist'),
'access' => user_access('create wish list'));
}
return $items;
}
and the form_hook
/**
* Implementation of hook_form().
*/
function wishlist_form(&$node) {
watchdog('special','in wishlist_form',NULL);
$output = '';
if (function_exists('taxonomy_node_form')) {
$output .= implode('', taxonomy_node_form('wishlist', $node));
}
//Now we define the form elements specific to our node type.
$output .= form_textfield(t('Occasion'),'occasion',$node->occasion,60,128);
return $output;
}
I put the watchdog call in there as a debug statement....this watchdog function NEVER GETS CALLED...so I can only conclude that wishlist_form is never being called......this is obviously a huge problem, but I'm unsure as to the cause of the problem.....anyway.....
here's my hook_help
/**
* Implementation of hook_help().
*/
function wishlist_help($section) {
switch ($section) {
case 'admin/modules#description':
//This description is shown in the listing at admin/modules
return t('This is just a test for custom wish lists...');
case 'node/add#wishlist':
//This description is shown when users click on "create content"
return t('This creates a new wish list.');
}
}
Any help would be GREATLY apprechiated!