Needs review
Project:
Entity Pager
Version:
2.0.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jun 2026 at 15:54 UTC
Updated:
6 Jun 2026 at 17:09 UTC
Jump to comment: Most recent
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;
}
}
}
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
Comment #4
dkmishra commented