Implement hook_help()

Created on 4 February 2023, over 1 year ago
Updated 21 June 2024, 4 days ago

Problem/Motivation

The module does not implement hook_help(), which should instead implemented.

📌 Task
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇮🇳India Kamlesh Kishor Jha Jaipur

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Kamlesh Kishor Jha
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India Kamlesh Kishor Jha Jaipur

    Created MR for the issue.
    Please review.
    Thanks

  • 🇵🇹Portugal jcnventura

    The MR is doing a lot of unrelated changes. Please clean it up so that only the .module file is being changed.

  • Status changed to Needs work over 1 year ago
  • First commit to issue fork.
  • Assigned to dharmeshbarot
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India dharmeshbarot Gujarat

    I made the changes in 3339230-hookhelp-function-missing branch! needs review

  • Status changed to Needs work about 1 year ago
  • 🇮🇳India Prashant.c Dharamshala

    In the help section, you can also mention the routes like /admin/reports/login-history, etc. to access different login history reports. Otherwise, it is difficult for users to find these URLs.

  • Assigned to vimal_nadar
  • 🇮🇳India vimal_nadar

    I will work on it.

  • 🇺🇸United States greggles Denver, Colorado, USA

    Does this module need this? How is it helpful to end users?

  • 🇮🇳India Raveen Kumar

    Hello Guys,
    I have implemented the hook_help on my Drupal website having version - 9.5.9 & PHP version - 8.1
    I am adding before-patch and after-patch screenshots for reference. Please review.
    Also, adding a patch to review/test.
    And thank you.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 8.1 & MySQL 5.6
    last update about 1 year ago
    2 fail
  • 🇺🇸United States greggles Denver, Colorado, USA

    Without an answer I'm tempted to close the issue because I start to assume the answer is "it is not helpful to end users."

    Asking one more time:

    Does this module need this? How is it helpful to end users?

  • 🇮🇳India Raveen Kumar

    Greggles, Yes, providing a help section in the module helps the end users to get to know about the module's functionality. Just like this module, if anyone downloads this module then they will get to know about the functionality of the module. As per drupal module config, I believe it is mandatory to add a help page.
    Thank You.

  • 🇵🇹Portugal jcnventura

    @Raveen Thakur, yes an help section would help the user. But it should be real help. And no it's not mandatory to add a help page. If it was mandatory, Drupal core would refuse to run this module, and that does not occur. At the moment, all this code does is provide the following unhelpful text:

    Login History adds a new table which stores information about individual user logins, including a timestamp, IP address, user agent information, and whether or not the login was via a reset password link.

    This is not real help. It is obvious to me that there's a lot of work to document that the hook_help() is added and would show up, but virtually no work on discussing the merits of adding this code. Unfortunately, patches to add hook_help(), or to fix "not a valid SPDX license identifier" in composer.json are frequently used by commit credit harvesters. Not accusing anyone here of that, but this code will only be RTBC when the help text becomes really helpful to the end user.

  • 🇮🇳India Raveen Kumar

    @Joao Ventura, Yes, I agree it is not mandatory at all to add a help section for the module. But almost every module on drupal.org has given a help section so that users can get to know about how the module works. Could you please let me know "but this code will only be RTBC when the help text becomes really helpful to the end user." What needs to be implemented in this hoo_help so that it becomes helpful to end users? Maybe so that I can work accordingly on it. Do you want to provide any kind of configuration in the hook_help so that it becomes helpful for end users? Please & thank you.

  • 🇵🇹Portugal jcnventura

    The proposed help text is a copy of the first paragraph of the module's homepage here in Drupal.org.

    The second paragraph lists what the module actually provides. A good help text would use the information on this second paragraph, elaborating on it, separating it in a different sections depending on the permissions (see https://git.drupalcode.org/project/login_history/-/blob/2.x/login_histor... for the current permissions provided by the module).

  • Status changed to Closed: works as designed 4 days ago
  • 🇺🇸United States greggles Denver, Colorado, USA

    Adding more help text is not necessariliy helpful, so I think we can close this. If someone has a proposal for help text that is helpful we can reopen this or have a new issue.

Production build 0.69.0 2024