Problem/Motivation

If your view contains node 42, then looking at user 42 or term 42 will make the pager thing you are on node 42.

There is no entity type check, it just looks for an entity in the route:

    $route = $this->routeMatch->getRouteObject();
    if ($route) {
      $parameters = $route->getOption('parameters');
      if ($parameters) {
        foreach ($parameters as $name => $options) {
          if (isset($options['type']) && strpos($options['type'], 'entity:') === 0) {
            $candidate = $this->routeMatch->getParameter($name);
            if ($candidate instanceof ContentEntityInterface && $candidate->hasLinkTemplate('canonical')) {
              $entity = $candidate;
              break;
            }
          }
        }

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

joachim created an issue. See original summary.

dkmishra made their first commit to this issue’s fork.

dkmishra’s picture

Status: Active » Needs review