User-defined help texts are shown for node adding forms (see node.module:42), but not for node editing forms. killes considers this a bug, so I made a small patch to get those help texts into node editing forms as well. Applies to current HEAD, and "with fuzz 2" also to DRUPAL_5.

CommentFileSizeAuthor
node_edit_help_text.patch786 bytesjpetso

Comments

robloach’s picture

Seemed to do the trick here. Thanks a lot.

pwolanin’s picture

Status: Needs review » Reviewed & tested by the community

Applies cleanly, seems to work, code is simple and looks correct.

For 6.x, at least, I think it's fine not check if $node was loaded, since for a non-existent node you'll get sent to drupal_not_found() before this code is called.

Steven’s picture

Status: Reviewed & tested by the community » Needs work

This can be written in a more compact fashion. Code should not repeat.

pwolanin’s picture

Steven, I though about that too, but it wasn't obvious to me how to make it not repeat without an if/else block that was very convoluted.

gábor hojtsy’s picture

There is a more fundamental problem here. There is no guarantee that the help hook is only called once on a page, and the page level help text is requested. Admin pages use the help hook to build up a dynamic menu item list of modules providing help, so we are not limiting the help hook to provide page help. These if's does not check if we have anything in $section which has something to do with what arg()s return. It probably did not show up because these arg() checks are not conflicting with the admin page menu building, which is the only other core use case for non-page level help calls, but you get the idea.

gábor hojtsy’s picture

So a better solution would be to pass on the real path value to check with, not relying on that we might get called for the page help.

dpearcefl’s picture

Is this an issue any more?

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.