Problem/Motivation
Help module's help_help() incorrectly contains a mention of "context-sensitive help" which actually originates from the system module. Additionally, system module's hook_help() fails to mention this fact.
Proposed resolution
Patch in #3 adequately solves the original scope of this issue, however system module's help information needs to reflect its additional functionality. Additional patch needed. Working on this now.
Remaining tasks
| Task | Novice task? | Contributor instructions | Complete? |
|---|---|---|---|
| Remove mentions of "context-sensitive" from help module | Novice | Update documention. Patch in #3 | by @er.pushpinderrana |
| Reroll patch in #3 to include system module edits | Novice | Add help text describing system module's System Help block. [DONE] | |
| Manual test | Novice | Make sure both Help and System module help visible from admin/help is still formatted OK. Also, in the new section in System help (the section on displaying administrative help), make sure the links work, and that UI text matches the actual Drupal UI |
User interface changes
API changes
Original report by @jhodgdon
While reviewing the patch for another issue, I learned that the functionality of "providing context-sensitive help on individual pages of your site" is actually a function of the System module, not the Help module. So this text in the help module's function help_help():
$output .= '<dt>' . t('Providing context-sensitive help') . '</dt>';
$output .= '<dd>' . t('The Help module displays context-sensitive advice and explanations on various pages.') . '</dd>';
$output .= '</dl>';
and also the mention above in About, are wrong. This is not something the Help module does. It is part of the System module, and it also is only displayed if you have the System Help block shown.
So, we should remove mentions of context-sensitive help from this help text. Should be a fairly easy novice patch... it is function help_help() in core/modules/help/help.module, and inside case 'help.page.help'.
| Comment | File | Size | Author |
|---|---|---|---|
| #36 | interdiff-2261083-30-36.txt | 3.8 KB | amitgoyal |
| #36 | drupal8-help-mentions-context-sensitive-2261083-36.patch | 4.42 KB | amitgoyal |
Comments
Comment #1
pushpinderchauhan commentedAttached patch would remove this context-sensitive help from this help text.
Comment #2
jhodgdonThanks, what you did looks good! But there is also a mention of the context-sensitive help up a few lines in the "About" section. Can you fix that too please?
Comment #3
pushpinderchauhan commentedThankyou Jennifer for correcting me.
In last patch missed it but this time deleted from About section too.
Comment #4
jhodgdonLooks good, thanks!
Comment #5
webchickI'm struggling with this a bit because we're not moving the help text to system module (for good reason), we're simply removing it. That means we also remove any ability for users to learn about this feature. OTOH, this contextual help is *not* in fact a user-facing feature; it's something for module developers to then simply be displayed to end-users.
I think what we should do then is move a variant of this documentation to the doxygen of hook_help() (which is sort of arguing against myself in the other issue) so that module developers realize hook_help() has this capability. Ideally this would be coupled with an example of providing dynamic help as well.
Comment #6
webchickhook_help(), btw, is documented in help.api.php, which brings it back to Help module's domain. D'oh. :)
Comment #7
jhodgdonI agree that the hook_help docs should be moved into a system.module *.api.php file. I also agree it should mention how the help is displayed, which it currently doesn't do. Can we do that on a separate issue please though? I filed:
#2263047: hook_help should be moved and should explain how help is displayed
for that piece.
We have a separate issue open to update the system module hook_help(). It is really missing a LOT, not just this piece, and I had already added a comment there that it needs this piece. I would rather not do this as part of this issue here, but we could... that other issue is postponed. See #2091363-12: Update hook_help for System module
Comment #8
jhodgdonDiscussed this with webchick in IRC... We should also (for now) update the System module help (add a "Uses" item) to talk about context-sensitive help being displayed in the System Help block. And we should do it in this patch. And then when we've got this into 8, backport to Drupal 7, because we checked and the system behaves the same way there.
Comment #9
jhodgdonI just filed a meta-issue where we need to discuss the top-of-page help:
#2263359: hook_help(): Top of page help sections can't link to help pages without a fatal error or checking for help module
Comment #10
aschmoe commentedComment #11
aschmoe commentedComment #12
aschmoe commentedComment #13
aschmoe commentedComment #14
jhodgdonI just edited the issue summary to remove a task. We are not wanting to wait for the other issue to be resolved. For now we need to document what the modules do now, and I think we're going to continue to have top-of-page help anyway.
Comment #15
jhodgdonAlso... If someone is actually working on this, please assign the issue to yourself... for the moment have taken out the "working on this now" from the issue summary, since I do not think anyone is working on it.
Comment #16
pushpinderchauhan commentedThank you Jennifer for your additional information.
I am working on this now.
Comment #17
pushpinderchauhan commentedAdded context-sensitive advice information to system module in this patch.
Comment #18
jhodgdonLooks good... but
This isn't very great documentation, because it doesn't mention that this help is displayed in a block. If someone doesn't have this block placed in a region in their admin theme, they won't get the hep displayed. So... We have hook_help pages for various modules that refer to blocks; we should do something similar here to other help that mentions blocks.
Also maybe we should say that this help is provided by other modules, and is generally for administration pages?
Comment #19
pushpinderchauhan commentedJennifer, Thanks a lot for your valuable feedback. Please review following documentation and correct me if require some more changes in this. Once you will confirm the final documentation, I would add the same in final patch.
Comment #20
jhodgdonNo... We are not talking here about contextual links -- that is something different, and is provided by the Contextual Links module. We are talking here about the System Help block.
Comment #21
pushpinderchauhan commentedSorry I get confused in between contextual links and context-sensitive help. Now I did research on this and found the difference. I hope this time I am going in right direction, please evaluate following documentation.
Thank you for your support and guidance.
Comment #22
aschmoe commentedThe last part worth mentioning is the System Help block is defined by the system module
t('The System Help block is defined by the System module, and displays context-specific (path based) help text provided by modules in a <a href="@hook-url">hook_help()</a> call. This block can be placed, edited or removed on the <a href="@block-page">Block layout page.', array('@hook-url' => 'https://api.drupal.org/api/drupal/core!modules!help!help.api.php/function/hook_help/8', '@block-page' => url('admin/structure/block')))Comment #23
jhodgdonUmmm.... So: Generally, I like the text in #22 a lot better than the text in #21, and I believe it is more accurate as far as what the System module and other modules are doing... so let's use that as a starting point. ... how about this -- I don't think we need to say any more than this:
---
Providing administrative help
Page-specific administrative help text that is provided by the System module and other modules is displayed in the System help block. This block can be placed and configured on the Block layout page.
---
As a note: When you link to the Block layout page, make sure to check whether the Block module is enabled first. There is an example of how to do this in the Menu module hook_help().
Comment #24
pushpinderchauhan commentedThank you Jennifer and Alex.
Please review this patch, added required documentation suggested by you.
Comment #26
pushpinderchauhan commentedAhh.... I missed the else condition.
Comment #27
jhodgdonThanks, that looks good! Can someone please give this a quick manual test (the Help and System module help from admin/help) to make sure both are still formatted OK, and also in the new section in System help, make sure the links work, and that UI text matches the actual Drupal UI?
Comment #28
pushpinderchauhan commentedThanks, Attached screenshots would help you to quick review of this patch.
Comment #29
jhodgdonThanks! The formatting looks good. So we still need a manual test on the new section in System module to verify the links work, and that the UI text matches what you see in the UI (especially the block name).
Comment #30
joshi.rohit100updated patch as '.' is missing in last in Performing system maintenance para.
please review now.
Comment #31
jhodgdonGood catch! Patch still needs manual testing as described in #29.
Comment #32
amitgoyal commentedPlease review updated patch with following fixes in system.module,
<a href="@link"> converted to <a href="!link">Comment #33
jhodgdonWe have a separate issue to update the System help as a whole:
#2091363: Update hook_help for System module
So the patch in #32 is out of scope for this issue. Let's please keep this issue specifically only about moving this one piece of help from the Help module to System module. Thanks!
Please disregard the patch in #32 (you can put it on the other issue), and go back to the patch in #30.
Comment #34
amitgoyal commentedSure @jhodgdon. Thanks for the update!
Comment #35
jhodgdonI went back and tested the patch in #30.
It is 99% good! Two things to fix:
a) I do not know what the change is in system.module in the patch above the new section, but can we take that out? This patch should only be adding a new section to that help function. I mean this change should be removed from the patch:
b) As noted in #32, the name of the help block is "System Help", and the capitalization is incorrect in the patch.
Comment #36
amitgoyal commentedPlease review updated patch with fixes in #35.
a) The change has been reverted.
b) The name of the help block is now "System Help".
Comment #37
pushpinderchauhan commentedThanks @amit for quick fixing.
This patch looks same as #17 patch except "System help" changed to "System Help".
@jhodgdon, please review and let us know if still any change required.
Comment #38
jhodgdonThanks, the latest patch looks good to me too!
Comment #39
jhodgdonThanks again everyone! Committed to 8.x.