From 4477c45c847e1dbfe29490a080b4e7f543dadab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Gro=C3=9Fberndt?= Date: Mon, 2 Mar 2026 17:34:23 +0100 Subject: [PATCH] [BUGFIX] Compatibility with PostgreSQL * `1` is not a valid SQL `$permClause` that can be used in `PageTreeService->getTreeList()`. It could be replaced with `1=1`, but since this has the same result as removing it entirely, this is the better option. Removal prevents an SQL error `argument of AND must be type boolean, not type integer` in PostgreSQL when opening the backend module. * `image` contains an integer (UID of `sys_file`) and is not a valid field for searching. Removal prevents an SQL error `operator does not exist: integer ~~* unknown` due to `No operator matches the given name and argument types` in PostgreSQL when searching for users in the backend module. --- Classes/Domain/Repository/UserRepository.php | 3 +-- Classes/UserFunc/UserOptions.php | 2 +- Configuration/TypoScript/Main/setup.typoscript | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Classes/Domain/Repository/UserRepository.php b/Classes/Domain/Repository/UserRepository.php index f5a3ca669..62397f666 100644 --- a/Classes/Domain/Repository/UserRepository.php +++ b/Classes/Domain/Repository/UserRepository.php @@ -230,7 +230,6 @@ protected function filterBySearchword(array $filter, QueryInterface $query, arra $orConditions[] = $query->like('email', '%' . $searchword . '%'); $orConditions[] = $query->like('fax', '%' . $searchword . '%'); $orConditions[] = $query->like('first_name', '%' . $searchword . '%'); - $orConditions[] = $query->like('image', '%' . $searchword . '%'); $orConditions[] = $query->like('last_name', '%' . $searchword . '%'); $orConditions[] = $query->like('middle_name', '%' . $searchword . '%'); $orConditions[] = $query->like('name', '%' . $searchword . '%'); @@ -262,7 +261,7 @@ protected function filterByUserConfirmation(array $and, QueryInterface $query, b protected function getTreeList($pageIdentifier): array { $pageTreeService = GeneralUtility::makeInstance(PageTreeService::class); - $treeList = $pageTreeService->getTreeList($pageIdentifier, 99, 0, '1'); + $treeList = $pageTreeService->getTreeList($pageIdentifier, 99); return GeneralUtility::trimExplode(',', (string)$treeList, true); } diff --git a/Classes/UserFunc/UserOptions.php b/Classes/UserFunc/UserOptions.php index 04eaa42de..99aef34c2 100644 --- a/Classes/UserFunc/UserOptions.php +++ b/Classes/UserFunc/UserOptions.php @@ -56,7 +56,7 @@ protected function getPageUidList(array $params): string $pageTreeService = GeneralUtility::makeInstance(PageTreeService::class); $depth = $params['flexParentDatabaseRow']['recursive']; foreach ($this->getPages($params) as $pageIdentifier) { - $list .= $pageTreeService->getTreeList($pageIdentifier, $depth, 0, '1'); + $list .= $pageTreeService->getTreeList($pageIdentifier, $depth); $list .= ','; } diff --git a/Configuration/TypoScript/Main/setup.typoscript b/Configuration/TypoScript/Main/setup.typoscript index baf52bf9b..4c134a202 100644 --- a/Configuration/TypoScript/Main/setup.typoscript +++ b/Configuration/TypoScript/Main/setup.typoscript @@ -1596,7 +1596,7 @@ plugin.tx_femanager { list { filter { searchword { - fieldsToSearch = address, city, company, country, email, fax, first_name, image, last_name, middle_name, name, telephone, title, usergroup.title, username, www, zip + fieldsToSearch = address, city, company, country, email, fax, first_name, last_name, middle_name, name, telephone, title, usergroup.title, username, www, zip } } }