help? sometimes lists empty features
John Morahan - October 16, 2007 - 21:10
| Project: | Bot |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed |
Description
hook_help implementations sometimes return an empty string when there is no help - e.g. pathauto_help(), actions_help(), but these get added to the array when hook_help is invoked via module_invoke_all() as in bot.module, resulting in "empty" features being listed, e.g. (22:09:11) Druplicon_tmp: Detailed information is available by asking for "help <feature>" where <feature> is one of: , Botagotchi, Drupal URLs, Factoids, Function Lookups, Seen. (note the comma at the start of the feature list)

#1
#2
typo
#3
This is actually a bug in those modules, not in bot.module. Both actions.module and pathauto.module always preinit $output to '' (as opposed to NULL) and always return $output, regardless if the module help properly fires. This is not something that any of the core modules do, and is bad design. Akismet.module does it also. Whilst I agree that your fix would get rid of these errors, I don't find them MY errors to get rid of - they should be fixed in the source module (and I heartily will support you creating issues in their queues that refer to this explanation).
#4
This also occurs with the triggers.module of Drupal 6 (which is actions.module in disguise).
#5
See also http://drupal.org/node/184722.
#6
I agree it is bad design. I guess the reason it doesn't come up, is that help.module itself doesn't breaks when this happens, due to the unusual ways it invokes this hook.
Okay, off I go to create more bug reports.
#7
This is now fixed in pathauto and actions, still waiting for akismet but I guess nothing more needs to be done here.
#8
Automatically closed -- issue fixed for two weeks with no activity.
#9
Reopening. I should probably do this cos people aren't learning.
#10
Fixed in DRUPAL-6--1. Thanks!
#11
Automatically closed -- issue fixed for two weeks with no activity.