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.
| Comment | File | Size | Author |
|---|---|---|---|
| node_edit_help_text.patch | 786 bytes | jpetso |
Comments
Comment #1
robloachSeemed to do the trick here. Thanks a lot.
Comment #2
pwolanin commentedApplies 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.
Comment #3
Steven commentedThis can be written in a more compact fashion. Code should not repeat.
Comment #4
pwolanin commentedSteven, 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.
Comment #5
gábor hojtsyThere 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.
Comment #6
gábor hojtsySo 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.
Comment #7
dpearcefl commentedIs this an issue any more?