diff --git a/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php b/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php index c5a74c1001bd2f2ad2fd3abcee767e52da721546..53c2971cc57e32ae416813e8e62199d3c125a21e 100644 --- a/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php +++ b/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php @@ -840,6 +840,9 @@ class AbstractDatabaseRecordList extends AbstractRecordList } $queryBuilder = $this->prepareQueryBuilder($table, $pageId, ['*'], $constraints, $queryBuilder, false); + // Reset limit and offset for full count query + $queryBuilder->setFirstResult(0); + $queryBuilder->setMaxResults(1); $this->totalItems = (int)$queryBuilder->count('*') ->execute()