From 55e193790bdfed1634ee3c7aae1764e1caa0c7c5 Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Tue, 16 Dec 2025 12:48:28 +0530 Subject: [PATCH 1/2] Fixed: Order by and Order way not working for the lists in the Back office. --- classes/controller/AdminController.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index 67d88e69a..d5299ba94 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -875,9 +875,13 @@ class AdminControllerCore extends Controller $prefix = $this->getCookieFilterPrefix(); $filters = array(); if (isset($this->list_id)) { + $postPrefixPattern = '#^(' . + preg_quote($this->list_id, '#') . 'Filter_|' . + 'submitFilter' . + ')#i'; foreach ($_POST as $key => $value) { // only process the filter fields. - if (stripos($key, $this->list_id.'Filter_') !== 0) { + if (!preg_match($postPrefixPattern, $key)) { continue; } @@ -898,9 +902,15 @@ class AdminControllerCore extends Controller } } + $getPrefixPattern = '#^(' . + preg_quote($this->list_id, '#') . 'Filter_|' . + 'submitFilter|' . + preg_quote($this->list_id, '#') . 'Orderby|' . + preg_quote($this->list_id, '#') . 'Orderway' . + ')#i'; foreach ($_GET as $key => $value) { - // only process the filter fields. - if (stripos($key, $this->list_id.'Filter_') !== 0) { + // only process the filter and order by, order way fields. + if (!preg_match($getPrefixPattern, $key)) { continue; } From cfd5f7219038ce6bc90168082f3d2fa684bed600 Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Wed, 7 Jan 2026 18:29:36 +0530 Subject: [PATCH 2/2] Removed non needed code --- classes/controller/AdminController.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index d5299ba94..7e979e4d3 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -875,9 +875,9 @@ class AdminControllerCore extends Controller $prefix = $this->getCookieFilterPrefix(); $filters = array(); if (isset($this->list_id)) { - $postPrefixPattern = '#^(' . - preg_quote($this->list_id, '#') . 'Filter_|' . - 'submitFilter' . + $postPrefixPattern = '#^('. + $this->list_id.'Filter_|'. + 'submitFilter'. ')#i'; foreach ($_POST as $key => $value) { // only process the filter fields. @@ -903,10 +903,10 @@ class AdminControllerCore extends Controller } $getPrefixPattern = '#^(' . - preg_quote($this->list_id, '#') . 'Filter_|' . - 'submitFilter|' . - preg_quote($this->list_id, '#') . 'Orderby|' . - preg_quote($this->list_id, '#') . 'Orderway' . + 'submitFilter|'. + $this->list_id.'Filter_|'. + $this->list_id.'Orderby|'. + $this->list_id.'Orderway'. ')#i'; foreach ($_GET as $key => $value) { // only process the filter and order by, order way fields.