Problem/Motivation
#1202484: Improve usage of 'pager.manager' service in PagerSelectExtender, allow code to know the pager element ID used is causing a negative side effect in contrib, see #3201324: Tests fail on Drupal 9.2.
If a pager is created with a gap in the sequence of the pager elements, pager_test_preprocess_pager()
fails when trying to preprocess not exixting pagers.
The template processor in theme.inc, template_preprocess_pager()
, has protection for this
// Nothing to do if there is no pager.
if (!isset($pager)) {
return;
}
Proposed resolution
Copy the protection code to pager_test_preprocess_pager()
.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3202014
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:
- 3202014-pagertestpreprocesspager-should-return changes, plain diff MR !388
Comments
Comment #3
mondrakeDoes it need tests? It is already a hook implementation in a test module.
Comment #4
mondrakeMajor because it blocks Pagerer tests on D9.2
Comment #5
daffie CreditAttribution: daffie commentedThe small change to a test module look good to me.
We are only adding a check to see if the pager service has been loaded.
For me it is RTBC.
Comment #6
mondrakeComment #8
catchI was confused how the test module could break contrib tests, but of course it can if they rely on the test module. Seems like a reasonable change to make and no way to actually test this, so committed/pushed to 9.2.x, thanks!
Comment #10
mondrakeThanks for quick turnaround. Pagerer tests now pass on D9.2.