Project

General

Profile

Actions

Bug #89002

closed

List view search can't search for integer search phrase

Added by Michal Cygankiewicz about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-08-23
Due date:
% Done:

100%

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

Description

My table TCA searchFields are:

'searchFields' => '......,customer_number',

My field configuration is

'customer_number' => [
.......
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'int, unique',
'readOnly' => 1,
'max' => 11
],
],

In case I put number as a search phrase in TYPO3 main backend search I can find my record.

In case I put number as a search phrase in TYPO3 list view search I can not find my record.

Related core code: https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_8-7/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php#L979
TYPO3 is excluding from searchFields those fields which has "int" in "eval" configuration field.

Workaround for that is to add pidonly configuration so my field looks like:

'customer_number' => [
...
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'int, unique',
'readOnly' => 1,
'max' => 11,
'search' => [
'pidonly' => 'pidonly'
]
],
],

This looks strange for me and I consider it as a TYPO3 bug. Also https://docs.typo3.org/m/typo3/reference-tca/master/en-us/ColumnsConfig/Type/Input.html#id77 says pidonly should be bool but it have effect only if it is 'pidonly' => 'pidonly' because in_array function usage in https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_8-7/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php#L990.


Files

search.jpg (60.4 KB) search.jpg Michal Cygankiewicz, 2019-08-23 09:56

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #96454: Wrong checks for TCA search options in DatabaseRecordListClosed2022-01-04

Actions
Actions

Also available in: Atom PDF