Problem/Motivation

Per change record https://drupal.org/node/2250345 "hook_help() uses routes instead of paths"
hook_help is using routes now

Steps to reproduce

1) git pull d8,
2) clone tcmb into modules,
3) patch tcmb
4) install drupal
5) install (enable) tcbm
6) visit the help page (admin/help#tcmb). seeing the help would be nice.

Proposed resolution

Implement it.

Remaining tasks

  • patch in #3 causes an error on any page (see comment #6)

User interface changes

No

API changes

?

Comments

kartagis’s picture

Title: Remove hook_help. » Alter hook_help.
Issue summary: View changes
yesct’s picture

Issue summary: View changes
kartagis’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.8 KB

Here is a patch.

kartagis’s picture

Issue summary: View changes
kartagis’s picture

Issue summary: View changes
kartagis’s picture

After making the changes as per the change record, I got an error "Website encountered an unknown error". Here are the steps to reproduce:

1- git pull Drupal 8.
2- Install Drupal 8.
3- Enable Tcmb.
4- Apply the patch in #3
5- Visit any page.

I tried looking at webserver's error log, but there was nothing. So I queried {watchdog} and here is what I found:

%type: !message in %function (line %line of %file). | a:6:{s:5:"%type";s:23:"Recoverable fatal error";s:8:"!message";s:123:"Argument 2 passed to tcmb_help() must be an instance of Request, instance of Symfony\Component\HttpFoundation\Request given";s:9:"%function";s:11:"tcmb_help()";s:5:"%file";s:42:"/var/www/drupal-8/modules/tcmb/tcmb.module";s:5:"%line";i:46;s:14:"severity_level";i:3;}

yesct’s picture

Issue summary: View changes
yesct’s picture

Status: Needs review » Needs work

that error message was helpful.

I went to the actual issue #2183113: Update hook_help signature to use route_name instead of path and looked at the patch to see what they did to find an example.

looking at some, I noticed that they also had to add the use statement for Request.

Try adding that.

kartagis’s picture

Status: Needs work » Needs review
StatusFileSize
new1.96 KB

Use statement added, and I am uploading another patch.

  • Commit c93a83a on 8.x-2.x by Kartagis:
    Issue #2264893 by Kartagis: hook_help altered. See https://drupal.org/...
kartagis’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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