Closed (outdated)
Project:
Drupal core
Version:
6.x-dev
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2007 at 17:49 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent
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?