#87641Increase StaticRangeMapper max range or make it configurable
Description
I guess there are more projects than ours that deals with more than 100k news or records that needs to get paginated. When using f:widget.paginate and nice routes we do not want to use 100 elements per page because the amount of maximum pages is limited.
This part limits the amount of max pages inside pagination. Is there a special reason for the amount of 1000?
protected function buildRange(): array
{
$range = array_map('strval', range($this->start, $this->end));
if (count($range) > 1000) {
throw new \LengthException(
'Range is larger than 1000 items',
1537696771
);
}
For exmaple routeconfig used for pagination of EXT:news
routeEnhancers:
NewsPlugin:
type: Extbase
limitToPages:
- 1337
- 13370
extension: News
plugin: Pi1
routes:
- { routePath: '/{page}', _controller: 'News::list', _arguments: {'page': '@widget_0/currentPage'} }
- { routePath: '/{news_title}', _controller: 'News::detail', _arguments: {'news_title': 'news'} }
defaultController: 'News::list'
requirements:
page: '\d+'
defaults:
page: '0'
aspects:
page:
type: StaticRangeMapper
start: '1'
end: '1000'
news_title:
type: PersistedPatternMapper
tableName: tx_news_domain_model_news
routeFieldPattern: '^(?P<path_segment>.+)-(?P<uid>\d+)$'
routeFieldResult: '{path_segment}-{uid}'Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.