Bug #83301

Story #82206: list module enhancements/bugfixes

ListView search returns all elements

Added by Hannes Lau almost 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Category:
Backend User Interface
Target version:
-
Start date:
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Yes
Sprint Focus:

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.

Related issues

Follows TYPO3 Core - Bug #77045: FormEngine extremely slow due to Doctrine changesClosedMorton Jonuschat2016-07-11

Actions
#1

Updated by Hannes Lau almost 4 years ago

I guess this belongs in #82206, but unfortunately, I can't add a parent task.

#2

Updated by Stephan Großberndt almost 4 years ago

  • Parent task set to #82206
#3

Updated by Stephan Großberndt almost 4 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
#4

Updated by Stephan Großberndt almost 4 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
#5

Updated by Gerrit Code Review almost 4 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

#6

Updated by Stephan Großberndt almost 4 years ago

Hannes, would you please test this patch and add a Verified+1 if this works for you?

#7

Updated by Hannes Lau almost 4 years ago

Done. I was about to push return 'FALSE', but return '0=1' seems equivalent.

#8

Updated by Stephan Großberndt almost 4 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

#9

Updated by Gerrit Code Review almost 4 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

#10

Updated by Gerrit Code Review almost 4 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

#11

Updated by Stephan Großberndt almost 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#12

Updated by Gerrit Code Review almost 4 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

#13

Updated by Stephan Großberndt almost 4 years ago

  • Status changed from Under Review to Resolved
#14

Updated by Benni Mack about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF