When we have the pager like this:
screenshot

The current page is incorrectly identified:
https://git.drupalcode.org/project/ui_suite_bootstrap/-/blob/5.0.x/src/H...
The $variables['items']['pages'] array is like this:

[
  2 => ...
  3 => ...
  4 => ...
]

And the normalize function returns like this:

[
  0 => ...
  1 => ...
  2 => ...
]
CommentFileSizeAuthor
screenshot.png13.78 KBrpayanm
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

rpayanm created an issue. See original summary.

rpayanm’s picture

I try to fix this with this patch.
Or we can keep the keys in the $page variable.

rpayanm’s picture

Status: Active » Needs review
grimreaper’s picture

Assigned: Unassigned » grimreaper
grimreaper’s picture

Status: Needs review » Reviewed & tested by the community

Ok, so the problem happens on a full pager, when the "Number of pager links visible" is less than the number of pages.

  • grimreaper committed 806cf5dd on 5.0.x authored by rpayanm
    Issue #3471652 by rpayanm, grimreaper: Incorrect current page detection...
grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Reviewed & tested by the community » Fixed
grimreaper’s picture

Issue tags: +Barcelona2024

Status: Fixed » Closed (fixed)

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