Problem/Motivation
#3122526: Pager links inside a modal do not open in the modal addressed the issue with pager links in modal generally, but it looks like the "Last" pager link was missed.
Steps to reproduce
Basically the same as #3122526: Pager links inside a modal do not open in the modal steps to reproduce, except specifically for the "Last" pager link
- Create a custom route with a pager
- Create a route with a link to open the route in step 1 in a modal
- Open the modal, click the Last pager link
- Expected to see that page in the modal, but page is reloaded with ajax params rendered.
Alternative is to try enabling the pager_test test module and going to the /pager-test/modal-pager in browser.
Proposed resolution
In PagerPreprocess::preprocessPager(), change this:
$items['last']['attributes'] = new Attribute();
to
$items['last']['attributes'] = new Attribute($link_attributes);
Remaining tasks
- Make the suggested change
- Extend test coverage to include the Last pager link
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3572047
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:
- 3572047-last-pager-links
changes, plain diff MR !14715
Comments
Comment #2
godotislateComment #3
sourav_paulHi @godotislate
I would like to work on this but can you put down steps to reproduce the issue?
Thanks...
Comment #4
godotislateComment #5
sourav_paulThanks @godotislate for your co-operation, Successfully reproduced the issue By using pager-test module.
Here is SC: https://www.awesomescreenshot.com/video/49293510?key=d31efee965340df71d1...
Raising MR for the fixes.
Thanks..
Comment #7
sourav_paulComment #8
godotislateA comment on the MR.
Comment #9
sourav_paulComment #10
godotislateNice work, @sourav_paul.
Ran the test-only job and it fails as expected: https://git.drupalcode.org/issue/drupal-3572047/-/jobs/8455421
lgtm
Comment #11
sourav_paulThanks @godotislate for your guidance
Comment #12
longwaveNice find, great collaboration on the fix.
Committed and pushed 8b21d99491e to main and 89bc9a8a99b to 11.x and aac1f617cdb to 11.3.x. Thanks!
Doesn't backport to 10.6.x, not sure it's worth it now.