Bug #83301
closedStory #82206: list module enhancements/bugfixes
ListView search returns all elements
100%
Description
This issue is on the search function of the list module in the TYPO3 BE. Not the live search in the BE, not about FE searches.
Steps to reproduce- TYPO3 8.7
- Log into the BE as an admin
- Activate the "Indexed Search" extension
- Switch to the list module
- Create an indexed search configuration record (anywhere). Save and close.
- Click the search icon in the header of the list view (Not the live search at the top right)
- Enter a random search word like "aPPnmtdkRE"
Expected result: No items should be found at all
Actual result: The indexed search configuration will be found (allthough it does not contain 'aPPnmtdkRE'.
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php:922
public function makeSearchString($table, $currentPid = -1)
…
$searchableFields = $this->getSearchFields($table);
if (empty($searchableFields)) {
return '';
}
If getSearchFields returns []
, the searchString constraint is returned as ''
. This results to no search constraint for the given table at all. Instead we should either
- Search all fields of the given table
- Return false, to remove the table from the search results entirely.
Updated by Hannes Lau about 7 years ago
I guess this belongs in #82206, but unfortunately, I can't add a parent task.
Updated by Stephan Großberndt about 7 years ago
- Due date set to 2016-07-12
- Start date changed from 2017-12-12 to 2016-07-12
- Follows Bug #77045: FormEngine extremely slow due to Doctrine changes added
Updated by Stephan Großberndt about 7 years ago
- Due date deleted (
2016-07-12) - Status changed from New to In Progress
- Assignee set to Stephan Großberndt
- Start date deleted (
2016-07-12) - Complexity set to easy
- Is Regression set to Yes
Updated by Gerrit Code Review about 7 years ago
- Status changed from In Progress to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55048
Updated by Stephan Großberndt about 7 years ago
Hannes, would you please test this patch and add a Verified+1 if this works for you?
Updated by Hannes Lau about 7 years ago
Done. I was about to push return 'FALSE'
, but return '0=1'
seems equivalent.
Updated by Stephan Großberndt about 7 years ago
I went for as this was used in
// If no search field conditions have been built ensure no results are returned if (empty($constraints)) { return '0=1'; }
below
Updated by Gerrit Code Review about 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55048
Updated by Gerrit Code Review about 7 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55048
Updated by Stephan Großberndt about 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a64db2880f462c24d4292e2f40f1555275e661a0.
Updated by Gerrit Code Review about 7 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55059
Updated by Stephan Großberndt about 7 years ago
- Status changed from Under Review to Resolved
Applied in changeset 2a75f8b60afbfee2988dcf42cb79c2d3428f7bbd.