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
?
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | alter-hook_help-2264893.patch | 1.96 KB | kartagis |
| #3 | alter-hook_help-2264893.patch | 1.8 KB | kartagis |
Comments
Comment #1
kartagisComment #2
yesct commentedComment #3
kartagisHere is a patch.
Comment #4
kartagisComment #5
kartagisComment #6
kartagisAfter 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;}Comment #7
yesct commentedComment #8
yesct commentedthat 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.
Comment #9
kartagisUse statement added, and I am uploading another patch.
Comment #11
kartagis