Problem/Motivation

The README.md file is not displaying on the Help page (/admin/help/search_api_attachments).

Warning: file_get_contents(/var/www/html/docroot/modules/contrib/search_api_attachments/README.txt): Failed to open stream: No such file or directory in /var/www/html/docroot/modules/contrib/search_api_attachments/search_api_attachments.module on line 69

Steps to reproduce

  • Update module to version 9.0.1
  • Visit /admin/help/search_api_attachments on your site
  • Notice that the README does not load and instead throws a warning about a missing file

Proposed resolution

Update /docroot/modules/contrib/search_api_attachments/search_api_attachments.module to include README.md instead of README.txt.

Change line 69 in search_api_attachments.module to

/**
 * Implements hook_help().
 */
function search_api_attachments_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.search_api_attachments':
      $text = file_get_contents(dirname(__FILE__) . '/README.md');
      if (!\Drupal::moduleHandler()->moduleExists('markdown')) {
        return '<pre>' . $text . '</pre>';
      }
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hannakras created an issue. See original summary.

hannakras’s picture

Version: 9.0.1 » 9.0.x-dev
Status: Active » Needs review
StatusFileSize
new659 bytes

This patch fixes the small change in the README file name in the .module file.

keshavv’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed that the filename is changed from README.txt to README.md.
#2 patch is good to merge.
Thank you!

  • izus committed 0d4f5a5e on 9.0.x authored by hannakras
    Issue #3373951: Update .module file to include README.md
    
izus’s picture

Status: Reviewed & tested by the community » Fixed

merged
thanks

Status: Fixed » Closed (fixed)

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