Fix up/review additional parts of node module help

Created on 7 February 2014, over 10 years ago
Updated 26 January 2024, 8 months ago

On #2091343: Update hook_help for Node module β†’ , we fixed up, reviewed, and tested the main module help portion of hook_help() for the Node module (the part with case 'admin/help#node':.

But the rest of hook_help() still needs some work, and this issue is to address that. It probably needs to wait until #2180343: hook_help's $path doesn't contain '%' wildcards. β†’ is fixed, however.

To be addressed:

a) The top of hook_help() calls deprecated functions user_access() and url(), and should be revised. Also the text/links have not been tested, so we need to set up a situation where the text would be shown and review the formatting and make sure the links work.

b) There are several cases below that have % in their paths currently. Since % in paths isn't working, this help text is not being shown anywhere. Hence, it has not been reviewed. Here's the current code:

     case 'admin/structure/types/manage/%/form-display':
      $type = entity_load('node_type', $arg[4]);
      return '<p>' . t('Content items can be edited using different form modes. Here, you can define which fields are shown and hidden when %type content is edited in each form mode, and define how the field form widgets are displayed in each form mode.', array('%type' => $type->label())) . '</p>' ;

    case 'admin/structure/types/manage/%/display':
      $type =  entity_load('node_type', $arg[4]);
      return '<p>' . t('Content items can be displayed using different view modes: Teaser, Full content, Print, RSS, etc. <em>Teaser</em> is a short format that is typically used in lists of multiple content items. <em>Full content</em> is typically used when the content is displayed on its own page.') . '</p>' .
        '<p>' . t('Here, you can define which fields are shown and hidden when %type content is displayed in each view mode, and define how the fields are displayed in each view mode.', array('%type' => $type->label())) . '</p>';

    case 'node/%/revisions':
      return '<p>' . t('Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.') . '</p>';

    case 'node/%/edit':
      $node = node_load($arg[1]);
      $type = node_type_load($node->bundle());
      return (!empty($type->help) ? filter_xss_admin($type->help) : '');

c) There's a section at the bottom where it tries to show the help for a node type when you are on the node/add page. As the code in help.module evolves, we should test that and make sure it is working too. Actually we should probably add a test to make sure it keeps working.

πŸ“Œ Task
Status

Closed: outdated

Version

9.5

Component
Node systemΒ  β†’

Last updated 1 minute ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States jhodgdon Spokane, WA, USA

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

    I think this one is outdated. The help has been converted to routes and it does not refer to removed functions.

    If there is something more to do, reopen and state what I missed.

    Thanks.

Production build 0.71.5 2024