In token_help, there is this code:

if ($route_name == 'help.page.token') {
    $current_url = Url::fromRoute('<current>');
     if ($current_url->toString() != 'admin/help/token') {
      // Because system_modules() executes hook_help() for each module to 'test'
      // if they will return anything, but not actually display it, we want to
      // return a TRUE value if this is not actually the help page.
      return TRUE;
    }

Since my site is located at michelle.dev/d8b6, $current_url->toString() returns "/d8b6/admin/help/token" which makes it just return TRUE.

I am running the beta 6 of core but I am fairly sure I'm using the latest Token dev snapshot.

CommentFileSizeAuthor
#1 2438723-token-help.patch669 bytesTR
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR’s picture

Status: Active » Needs review
FileSize
669 bytes

Attached patch fixes this problem. It's a trivial fix, the code is just missing the leading '/' in the path so the != comparison will always be true.

TR’s picture

Title: Help displays "1" when site in a subdirectory » Help page at /admin/help/token displays "1"

Also note, this happens whether or not your site is in a subdirectory.

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Looks ok, could possibly also be implemented with the route match instead.

Dave Reid’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x-1.x

  • Dave Reid committed b6d36d7 on 8.x-1.x authored by TR
    Issue #2438723 by TR: Help page at /admin/help/token displays "1"
    

Status: Fixed » Closed (fixed)

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