Additional People to Credit

There were several issues that had patches that were combined into this one. Additional people to credit, who worked on the other issues:
#3043460: Convert automated_cron module hook_help() to topic(s)
vadim.hirbu
BramDriesen
shwetaneelsharma

#3047585: Convert ban module hook_help() to topic(s)
lisagodare@gmail.com

Problem/Motivation

#3041924: [META] Convert hook_help() module overview text to topics for the automated_cron, ban, dblog, syslog, system, update, and user modules

Exception: Functionality in the System module that is related to themes should go in #3055055: Convert appearance-related modules: breakpoint, color, layout_builder, layout_discovery module hook_help() to topic(s) instead.

Proposed resolution

Take the information that is currently in the hook_help module overview section for the module(s), and make sure the information is in one or more Twig help topic files. Steps:

  1. Find the hook_help() implementation function in the core/modules/MODULENAME/MODULENAME.module file(s). For example, for the core Contact module, the module files is core/modules/contact/contact.module, and the function is called contact_help().
  2. Locate the module overview portion of this function. This is located just after some lines that look something like this:
      switch ($route_name) {
        case 'help.page.contact':
    

    And ends either at the end of the function, or where you find another case 'something': line.

  3. We want to end up with one or more topics about the tasks that you can do with this module, and possibly a section header topic. So, read the help and figure out a good way to logically divide it up into tasks and sections. See Standards for Help Topics for information on how to do this.
  4. See if some of these tasks are already documented in existing topics. Currently, all topics are in core/modules/help_topics/help_topics. Note that to see existing topics, you will need to enable the experimental Help Topics module (available in the latest dev versions of Drupal 8.x).
  5. For each task or section topic that needs to be written, make a new Twig topic file (see Standards for Help Topics) in core/modules/help_topics/help_topics. You will need to choose the appropriate module prefix for the file name -- the module that is required for the functionality. Alternatively, if the information spans several modules or if the information should be visible before the module is installed, you can use the "core" file name prefix. For instance, it might be useful to know that to get a certain functionality, you need to turn on a certain module (so that would be in the core prefix), but then the details of how to use it should only be visible once that module is turned on (so that would be in the module prefix).
  6. File names must be MODULENAME.TOPICNAME.html.twig -- for example, in the Action module, you could create a topic about managing actions with filename action.managing.html.twig (and "MODULENAME" can be "core" as discussed above).
  7. Make a patch file that adds/updates the Twig templates. The patch should not remove the text from the hook_help() implementation (that will be done separately).

Remaining tasks

a) Make a patch (see Proposed Resolution section).

b) Review the patch:

  1. Apply the patch.
  2. Turn on the experimental Help Topics module in your site, as well as the module(s) listed in this issue.
  3. Visit the page for each topic that is created or modified in this patch. The topics are files in the patch ending in .html.twig. If you find a file, such as core/modules/help_topics/help_topics/action.configuring.html.twig, you can view the topic at the URL admin/help/topic/action.configuring within your site.
  4. Review the topic text that you can see on the page, making sure of the following aspects:
    • The text is written in clear, simple, straightforward language
    • No grammar/punctuation errors
    • Valid HTML -- you can use http://validator.w3.org/ to check
    • Links within the text work
    • Instructions for tasks work
    • Adheres to Standards for Help Topics [for some aspects, you will need to look at the Twig file rather than the topic page].
  5. Read the old "module overview" topic(s) for the module(s), at admin/help/MODULENAME. Verify that all the tasks described in these overview pages are covered in the topics you reviewed.

User interface changes

Help topics will be added to cover tasks currently covered in modules' hook_help() implementations.

API changes

None.

Data model changes

None.

Release notes snippet

None.

Comments

jhodgdon created an issue. See original summary.

jhodgdon’s picture

Issue tags: +Novice
jhodgdon’s picture

Assigned: Unassigned » jhodgdon

I'm working on this as a test for the meta issue process.

jhodgdon’s picture

Status: Active » Needs review
StatusFileSize
new1.4 KB

OK, first the analysis. The current hook_help() [module overview part] for the actions module says:

      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The Actions module provides tasks that can be executed by the site such as unpublishing content, sending email messages, or blocking a user. Other modules can trigger these actions when specific system events happen; for example, when new content is posted or when a user logs in. Modules can also provide additional actions. For more information, see the <a href=":documentation">online documentation for the Actions module</a>.', [':documentation' => 'https://www.drupal.org/documentation/modules/action']) . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Using simple actions') . '</dt>';
      $output .= '<dd>' . t('<em>Simple actions</em> do not require configuration and are listed automatically as available on the <a href=":actions">Actions page</a>.', [':actions' => \Drupal::url('entity.action.collection')]) . '</dd>';
      $output .= '<dt>' . t('Creating and configuring advanced actions') . '</dt>';
      $output .= '<dd>' . t('<em>Advanced actions</em> are user-created and have to be configured individually. Create an advanced action on the <a href=":actions">Actions page</a> by selecting an action type from the drop-down list. Then configure your action, for example by specifying the recipient of an automated email message.', [':actions' => \Drupal::url('entity.action.collection')]) . '</dd>';
      $output .= '</dl>';

So it looks like the tasks here are:
- Viewing available actions
- Configuring advanced actions

This is fairly short, so I wrote it up in one topic called "Viewing and managing actions". Since there is not yet a top-level topic that this belongs in, I have put it as top-level for now. Added a note to #3031642: Deprecate hook_help() and combine with Topics that after this whole project is done, we may need to reorganize the topics.

Anyway, here's a patch. Obviously won't do anything until #2920309: Add experimental module for Help Topics is committed.

vadim.hirbu’s picture

StatusFileSize
new1.4 KB
new2.48 KB

Just tested both patches and the file name of help topic is not working with this patch https://www.drupal.org/project/drupal/issues/2920309.

jhodgdon’s picture

Good catch! I guess I named it "actions" instead of "action". Thanks for testing!

jhodgdon’s picture

I will add a note to the meta issue with the file name concern.

jhodgdon’s picture

Issue summary: View changes

Updating issue summary as per new issue template from the parent issue.

jhodgdon’s picture

Issue summary: View changes

Updated summary from template.

shwetaneelsharma’s picture

StatusFileSize
new204.8 KB
new163.29 KB

Tested the patch 3041926-5.patch. Although the information provided is similar, I have an observation as mentioned below:

  1. The link to configuring actions permissions is missing admin/people/permissions#module-action after applying the patch. Please find the SS attached
jhodgdon’s picture

Thanks for reviewing! That link for configuring the Action module permissions is generated automatically on all hook_help() module overview pages. It will not be generated automatically in the help topics.

So, that is something we need to think about...

jhodgdon’s picture

I created an issue to discuss this question of what to do about the permissions links.

jhodgdon’s picture

Status: Needs review » Postponed

Guess this needs to be postponed until that decision is made.

benjifisher’s picture

Issue summary: View changes

I am updating the issue summary with the screenshots from #10. Yay, screenshots!

I also moved the completed tasks from "Remaining tasks" to "Completed tasks".

jhodgdon’s picture

I have un-postponed most of the issues for conversion, but this one is still blocked (see #12).

jhodgdon’s picture

Title: Convert action module hook_help() to topic(s) » Convert action, automated_cron, ban, dblog, syslog, system, update, and user module hook_help() to topic(s)
Issue summary: View changes

We are combining this issue with several other modules.

Patches to be added and people to credit:
#3043460: Convert automated_cron module hook_help() to topic(s) - vadim.hirbu , shwetaneelsharma
#3047585: Convert ban module hook_help() to topic(s) - lisagodare@gmail.com

The other modules had not been patched yet.

jhodgdon’s picture

Issue summary: View changes

Updated issue summary with better instructions/guidelines

jhodgdon’s picture

Assigned: jhodgdon » Unassigned
Status: Postponed » Needs work

I don't think we need to make links to the permissions i n the tasks. But these topics need to be revisited based on our new guidelines (see issue summary). Also I'm not currently working on this issue.

jhodgdon’s picture

Issue summary: View changes

We've migrated the help topic standards to https://www.drupal.org/docs/develop/documenting-your-project/help-topic-... so updating issue summary again.

volkswagenchick’s picture

Issue tags: +badcamp2019

Tagging this for badcamp2019. (October 2-5)

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

jhodgdon’s picture

Issue summary: View changes

We just found out that all topic Twig files currently need to go into core/modules/help_topics/help_topics (with their finalized module-based file names), for the time being until the Help Topics module is stable. Updating issue summary. Patch will need to be updated too.

mradcliffe’s picture

Issue tags: +Amsterdam2019

Adding event tag.

jhodgdon’s picture

Assigned: Unassigned » jhodgdon
Issue summary: View changes
StatusFileSize
new3.18 KB

I'm going to work on this module. First thing: as a starting point, here's a not working patch that combines the patches for the related issues that were combined into this one with the previous patch on this issue.

And I updated the issue summary to make sure people from the other issues are credited here.

jhodgdon’s picture

StatusFileSize
new12.23 KB
new10.8 KB

Here's a new patch -- still not done. What I did this time:
- Updated the meta-data for the three topics that were in the last patch to the new format, so that they would actually load.
- Wrote topics for the User module (and updated the one User module topic that was already committed)
- Made the Ban module topic be related to the User overview topic, instead of top-level
- The topics in this patch can at least be viewed now.

Still to do:
- Review the Action and Automated Cron topics. They probably shouldn't be top-level but right now there is nothing obvious to Relate them to.
- Write topics for dblog, syslog, system, and update.
- This should probably include an overview topic on cron that would mention automated cron and other ways to run cron. We might not need a whole topic on automated cron actually.
- Probably the topics for dblog and syslog can be combined into a topic about logging.
- Maybe we'll need a top-level topic about maintenance and troubleshooting (we have a chapter on that in the user guide) -- that would probably be a good grouping for the logging, cron, and update topics.

Anyway, I'll upload this now and continue to work on this the next few days, but leaving at Needs Work because it is not done yet.

jhodgdon’s picture

Status: Needs work » Needs review

triggering tests, then I'll set this back.

jhodgdon’s picture

Status: Needs review » Needs work
jhodgdon’s picture

Issue summary: View changes
Status: Needs work » Needs review
Related issues: +#3055055: Convert appearance-related modules: breakpoint, color, layout_builder, layout_discovery module hook_help() to topic(s)
StatusFileSize
new16.08 KB
new6.81 KB

Here's a new patch, which fixes a couple of minor things, and adds new topics on Cron and a (currently mostly empty) top-level Maintaining topic. I got rid of the automated cron topic; the Cron topic covers this.

System module functionality that still needs to be documented:
- Maintenance mode
- Installing/uninstalling modules
- Updating modules, themes, and core [needs to be Related to existing Maintaining and Security topics]
- Themes: installing/uninstalling, setting default, admin theme -- or could add this to #3055055: Convert appearance-related modules: breakpoint, color, layout_builder, layout_discovery module hook_help() to topic(s), which is all about theme-related stuff? I think that would be better actually. This patch will already be big enough. I'll do that (updating summary here also).
- Reports and logging (syslog and dblog, plus other reports. See also system.config_error -- which covered logging settings and visiting the dblog page.)

Also still need to figure out what to do with Actions. I'm trying to figure out what core functionality actually uses actions or why someone would want to configure them.

jhodgdon’s picture

Status: Needs review » Needs work
jhodgdon’s picture

Title: Convert action, automated_cron, ban, dblog, syslog, system, update, and user module hook_help() to topic(s) » Convert automated_cron, ban, dblog, syslog, system, update, and user module hook_help() to topic(s)
Issue summary: View changes

I had a discussion with berdir and xjm in Slack. I decided the Actions module should be in its own patch, as in Core it's really mostly used in Views. So I created #3094482: Convert action module hook_help() to topic(s), including views bulk operations and am taking Actions out of this issue (the patch still needs to have that topic removed).

jhodgdon’s picture

StatusFileSize
new23.23 KB
new7.63 KB

Here's another iteration, which documents clearing the cache and maintenance mode.

Still to do in this patch:
- Installing/uninstalling modules
- Updating modules, themes, and core [needs to be Related to existing Maintaining and Security topics]
- Reports and logging (syslog and dblog, plus other reports. See also system.config_error -- which covered logging settings and visiting the dblog page.)

jhodgdon’s picture

Status: Needs work » Needs review
StatusFileSize
new33.25 KB
new10.66 KB

OK, here it is! I think this patch is actually ready for a review now.

One note: I did not write topics about updating Drupal Core or modules. I think this is pretty complicated, depends a lot on your hosting, and should be left to the User Guide, which covers all the contingencies.

jhodgdon’s picture

StatusFileSize
new31.88 KB

Oh wait, I forgot -- the actions topic is not supposed to be in this patch. I didn't make an interdiff -- same patch but without the file action.configuring.html.twig [that is moved to the related issue].

anmolgoyal74’s picture

The patch looks fine. Added some of the screenshots.
Just one question: Should we change 'anonymous' to 'visitor' now or should we wait for https://www.drupal.org/project/drupal/issues/479708
to get fixed?

jhodgdon’s picture

We should wait for the other issue to be fixed definitely.

amber himes matz’s picture

Status: Needs review » Reviewed & tested by the community

TL;DR: Looks great. Setting to RTBC.

The patch in #33 modifies 4 existing topics and adds 14 new topics in core/modules/help_topics/help_topics.

Modified topics:

1. core.security.html.twig: Link to relevant User Guide chapter added. Link verified.
2. help.help_topic_search.html.twig: Related topic added to new-in-this-patch system.cache. Link added to system.cache in the body of the topic. Both links verified.

- We should add as related: core.cron

3. system.config_error.html.twig: Related topic added to new-in-this-patch core.maintenance. A line regarding database logging was removed because it is now covered in system.reports.html.twig and referenced in core.maintenance.html.twig.. Link verified.
4. user.security_account_settings.html.twig: Related topic added to user.overview. Link verified.

New topics:

1. ban.banning_ips.html.twig: (Install Ban module to view.) Looks good.
2. core.cron.html.twig: Looks good. Links verified.
3. core.extending.html.twig: Looks good. Links verified.
4. core.maintenance.html.twig: Looks good. All topics mentioned in the overview have related topic link listed.
5. system.cache.html.twig: Looks good. Links verified.
6. system.maintenance_mode.html.twig: Looks good. Links verified.
7. system.module_install.html.twig: Looks good. Links verified.
8. system.module_uninstall.html.twig: Looks good. Links verified.
9. system.reports.html.twig: Looks good. Links verified.
10. user.create.html.twig: Looks good. Links verified.
11. user.new_role.html.twig: Looks good. Links verified.
12. user.overview.html.twig: Looks good. Links verified.
13. user.permissions.html.twig: Looks good. Links verified.
14. user.update.html.twig: Looks good. Links verified.

amber himes matz’s picture

Status: Reviewed & tested by the community » Needs work

Sorry, just 1 thing. I pulled the RTBC trigger too soon. This was a big patch and my eyes got crossed a bit.

2. help.help_topic_search.html.twig: Related topic added to new-in-this-patch system.cache. Link added to system.cache in the body of the topic. Both links verified.

- We should add as related: core.cron

jhodgdon’s picture

Status: Needs work » Needs review
StatusFileSize
new2.8 KB
new32.3 KB

Thanks for the thorough review! Here's a new patch with the fix to add core.cron as related in the search topic. Also added a link to the text of that step (since it's a core-namespace topic, it will always be available).

amber himes matz’s picture

Status: Needs review » Reviewed & tested by the community

Thank you @jhodgdon! Great idea to add a link to that step as well. Tested the new link and everything looks great.

This patch in #38 is good to go.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 38: 3041926-38.patch, failed testing. View results

jhodgdon’s picture

Status: Needs work » Reviewed & tested by the community

Unrelated random fails.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 38: 3041926-38.patch, failed testing. View results

jhodgdon’s picture

Status: Needs work » Reviewed & tested by the community

Test error this time is "Unable to start the web server", unrelated to this patch.

alexpott’s picture

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed abc0df85ba to 9.1.x and c6fba094be to 9.0.x and d5cdc02c2a to 8.9.x. Thanks!

  • alexpott committed abc0df8 on 9.1.x
    Issue #3041926 by jhodgdon, vadim.hirbu, anmolgoyal74, shwetaneelsharma...

  • alexpott committed c6fba09 on 9.0.x
    Issue #3041926 by jhodgdon, vadim.hirbu, anmolgoyal74, shwetaneelsharma...

  • alexpott committed d5cdc02 on 8.9.x
    Issue #3041926 by jhodgdon, vadim.hirbu, anmolgoyal74, shwetaneelsharma...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.