From eb952e23cf5a2a2d780581ee14bfb9d18d256658 Mon Sep 17 00:00:00 2001 From: Kevin Ditscheid <kevin.ditscheid@sgalinski.de> Date: Fri, 12 Jan 2024 13:59:18 +0100 Subject: [PATCH] [BUGFIX] Fix joblist pagination for currentPage=0 --- Classes/Controller/JoblistController.php | 2 +- Configuration/Routes/config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Controller/JoblistController.php b/Classes/Controller/JoblistController.php index 483c525b..0921a150 100644 --- a/Classes/Controller/JoblistController.php +++ b/Classes/Controller/JoblistController.php @@ -304,7 +304,7 @@ class JoblistController extends ActionController { // get all jobs for the current page $allJobsCount = $this->jobRepository->findJobsByFilter($filters)->count(); $numberOfPages = (int) ($jobLimit <= 0 ? 0 : \ceil($allJobsCount / $jobLimit)); - if ($numberOfPages !== 0 && $currentPageBrowserPage >= $numberOfPages) { + if ($numberOfPages !== 0 && $currentPageBrowserPage > $numberOfPages) { /** @var PageRenderer $pageRenderer */ $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class); // the PageRenderer contains the content of the current request, the result of the following sub-request will diff --git a/Configuration/Routes/config.yaml b/Configuration/Routes/config.yaml index 07d771be..ba92b73c 100644 --- a/Configuration/Routes/config.yaml +++ b/Configuration/Routes/config.yaml @@ -12,7 +12,7 @@ routeEnhancers: value: seite-jobs currentPage: type: StaticRangeMapper - start: '1' + start: '0' end: '100' defaults: currentPage: '0' -- GitLab