Change record status: 
Project: 
Introduced in branch: 
8.1.x
Introduced in version: 
8.1.x
Description: 

The markup and method for generating the main Help page provided by the core Help module has changed.

Prior to this change, the page just listed "topics" from each module that implemented hook_help(). Each module could provide one help topic, and the topic title was automatically the name of the module. [Note: these topics are still listed, and hook_help() still exists just as it was before.]

After this change, the Help page uses a plugin system to display "sections". Each section on the page is provided by a HelpSection plugin; the plugin provides a permission, a title, a short piece of description text, and a list of "topics", which the Help module compiles into a page. Modules wanting to add sections to the admin/help page need to create a HelpSection plugin; see \Drupal\help\HelpSectionPluginInterface for the necessary details (annotation, methods, etc.) and \Drupal\help\Plugin\HelpSection\HookHelpSection for a working example. It would previously only have been possible to add something to the admin/help page by doing a routing override and substituting your own controller in place of the default routing information.

The list of hook_help() topics that was previously generated within the \Drupal\help\Controller\HelpController class is now generated in the \Drupal\help\Plugin\HelpSection\HookHelpSection plugin. The Core Tour module also provides a section for the page, with the \Drupal\tour\Plugin\HelpSection\TourHelpSection plugin. So the previous list of topics still exists on the page, and if you have the Tour module enabled, you'll also get a list of Available Tours on admin/help.

Modules and themes that were relying on or altering the markup of the admin/help page may be affected by this change:

  • The description text and header for the hook_help() topic list on the admin/help page changed slightly, because it used to imply that hook_help() topics were THE help topics, and now there can be multiple types of topics. This text used to be in the \Drupal\help\Controller\HelpController class, and is now in the \Drupal\help\Plugin\HelpSection\HookHelpSection plugin. The text in the introductory block provided by the Help module for the top of the page changed slightly as well -- that is in \Drupal\help\Plugin\Block\HelpBlock.
  • There may be additional text/headers/topic lists on the page, depending on the modules installed on the site and whether they provide HelpSection plugins. Previously there was only the 1 section listing hook_help() topics.
  • The markup for the topic lists within each section did NOT change.
  • For each section, there used to be hard-coded markup (provided by HelpController) for the header/description/topic list. It used to be:
    <h2>Help topics</h2><p>Help is available on the following items:</p>
    

    followed by the list of topic links. Now, each section has, by default, similar markup to this, but instead of the HelpController hard-coding the markup, it now uses a template called help-section.html.twig, which your theme can override. This template is added to the Stable base theme as well, and the Classy base theme has a version that provides a 4-column layout (this used to be hard-coded in the HelpController class too).

  • The topic list used to be themed by item-list templates. It is now part of the help-section.html.twig template, which lists the links in a simple (or 4-column separated) UL list.
Impacts: 
Module developers
Themers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done