Hi I'm new to drupal and learning how to develop modules from various internet tutorials and from books I bought.

I'm stuck in on area that I can't seem to figure why it's not working: I even simplified the module to test it out. Basically this dummy module just displays the help description. It shows up in the module list so I can enable, and it shows up in the admin>help page, but when I click it no text show up! Ugh, frustrating.

I'm using Drupal 6.19, php 5.3, and mysql 5.3.0. This is on a wamp setup. So localhost and windows.

I named the module "goodreads" because I was following a tutorial then I got stuck on this part. Spent hours trying to figure out why it does not work. I even copied and pasted a core hook_help() code to try it, but nothing changes when I click the help for this module.

My code:

<?php
/**
 * @file
 * dummy module
 */

/**
 * Implementation of hook_help()
 */
function goodreads_help($path, $arg) {
	switch ($path) {
		case 'admin/help#goodreads':
			return '<p>' . t('Test help text') . '</p>';
			break;
		case 'admin/content/goodreads':
			return '<p>' . t('test help text 2') . '</p>';
	}
}

Comments

Vj’s picture

function goodreads_help($path, $arg) {
  switch ($path) {
    case 'admin/help':
        return '<p>' . t('test help text 2') . '</p>';
        break;
    case 'admin/content/node':
       return '<p>' . t('test help text node') . '</p>';
       break;
  }
}

replace your code with this. Then go to admin/help you will find "test help text 2" just above the help topics,
and go to admin/content/node you will find "test help text node" below the Content.

ricesteam’s picture

Your code works, but it is not the behavior I seek.

I only want the text to appear if I click the module's help.

As of now, when I click the module help, nothing changes, no description displays, nothing...

Very baffling.

kashifa_2009’s picture

This worked for me. Place the help function all the way at the top. Thanks.

benlotter’s picture

This is the only function I have in the .module file. I'm following step-by-step the tutorial with cut and paste. Has someone successfully used this help document (http://drupal.org/node/206756), I fear there is a simple but subtle error somewhere.

widukind’s picture

Go to Administer > Performance and hit the "Clear cached data" button (located towards the bottom of the page).
This will resolve your issue, next time you go to Administer > Help and click your module's link the appropriate help content will show.

benlotter’s picture

Thanks for your suggestion. I have the same difficulty. I'm writing my first module and copying the code directly from the Drupal module building tutorial (http://drupal.org/node/206756).

I had already tried Flush all caches which did not work nor did Administer > Performance - Clear cached data.

I'm going to figure this out and post back the answer when I do. If someone has any other suggestions, I'm just spinning my wheels guessing at the moment.

benlotter’s picture

Well, I figured it out. I hope this saves someone else the time and headache.

I ran cron and it warned me about updates that I hadn't yet been applied. So then I ran updates and it applied several updates and then the help is working great. Basically, this is a multi-site installation where my most common modules are sites/all/modules. I had upgraded views and some other modules that I use in all my site, but I had never applied the updates in this particular sandbox site.

hwi2’s picture

I know this is 4 years late, but I just saw this. I clear the cache and the help shows up.