From 0b68668d140e8f408446694047f65c97ba735439 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Thu, 23 Nov 2017 07:27:08 +1100 Subject: [PATCH] Adds a constraint of 500 records at a time Example given with 5000 records cripples the filter, this cap will keep it usable until we develop a better solution. Refs #3202 --- modules/backend/widgets/Filter.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/backend/widgets/Filter.php b/modules/backend/widgets/Filter.php index 4049b152c..9af3a8c57 100644 --- a/modules/backend/widgets/Filter.php +++ b/modules/backend/widgets/Filter.php @@ -370,8 +370,15 @@ class Filter extends WidgetBase protected function getOptionsFromModel($scope, $searchQuery = null) { $model = $this->scopeModels[$scope->scopeName]; + $query = $model->newQuery(); + /* + * The 'group' scope has trouble supporting more than 500 records at a time + * @todo Introduce a more advanced version with robust list support. + */ + $query->limit(500); + /* * Extensibility */