The module smart_paging is not functioning anymore after upgrading the Drupal core to 7.71
7.70 was okay, both on develop and on production sites. Going back to 7.70 solves the problem, but that is not the intention, is it.
In detail: splitting pages by using the line <!--pagebreak--> in long html-docs does not show the possibility to go to the next page (or to the EOF). Instead there is empty space on the end of the screen, no longer the opportunity to scroll. The user has to stay on page 1!
![]()
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3149681-9.patch | 814 bytes | mcdruid |
Comments
Comment #2
Thale commentedComment #3
Thale commentedComment #4
Thale commentedComment #5
fortran77 commentedHi Thale, I listed the file changed from 7.70 and 7.71 and one such file is includes/pager.inc
Restoring the 7.70 version of pager.inc seems to have fixed the issue for me. This is of course not a permanent solution but allows us to narrow down the issue.
Comment #6
mcdruid commentedThis looks like a regression in the smart_paging module caused by the changes made for PHP 7.4 compatibility in #3084961: Trying to access array offset on value of type null in theme_pager/pager_first/pager_last/pager_previous/pager_next().
https://git.drupalcode.org/project/drupal/-/commit/ae921e89b1059ea25caba...
Having a quick look at smart_paging, my initial impression is that it's calling
theme_pager()without first callingpager_default_initialize().This has worked until the recent changes, but would have been causing PHP errors / notices in core as some of the global variables
theme_pager()uses would not have been initialised.I'm going to move this to the smart_paging module's issue queue, as I think this needs to be fixed there.
Comment #7
mcdruid commentedLooks like this may now be a duplicate of #3150995: Javascript paginator disappearing from first page after updating core to 7.71
Comment #8
fortran77 commentedHi mcdruid thank you for the help.
I tried callling pager_default_initialize() before the call to theme('pager') on line #1129 of the module but that did not seem to help (I might be missing some important detail though).
Comment #9
mcdruid commentedI can't say for sure that this is the right fix (600-line functions are not the easiest to grok), but this patch seems to avoid the problem in a very simple test scenario.
Hopefully it's a start.
Comment #11
arpeggio commented@mcdruid I have already pushed your patch. Thank you for sharing it.