Project

General

Profile

Actions

Bug #40347

closed

Backend Search doesn't find its own data sets

Added by Mirko grothe about 12 years ago. Updated over 4 years ago.

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

100%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I have in a Sysfolder own data from a own extension.
I have set the searchField in TCA-Confuguration (ext_tables.php)
There is a inputfield:

'xxxx_id' => array(
    'exclude' => 1,
    'label' => '......................',
    'config' => array(
        'type' => 'input',
        'size' => '45',
        'eval' => 'tx_.....datenbank..._id,required',
        )
),

The format of this field ist xxxx.xxxxx.xxxx (example: 1245.01024.0068, 1245.01554.0678, 2265.01824.2268, ...).
When i search for '1245' I find no results.
For searchstring '1245.', i find all data (starts with 1245).

The Problem is in file typo3/class.db_list.inc line 555.

if (t3lib_utility_Math::canBeInterpretedAsInteger($this->searchString)) {

My searchstring was interpreted as integer and the function makeSearchString returns only
AND uid = 1245

The second problem in this function is in lines 592-594.

if ($fieldConfig['type'] == 'text' ||
        $fieldConfig['type'] == 'flex' ||
        ($fieldConfig['type'] == 'input' && (!$fieldConfig['eval'] || !preg_match('/date|time|int/',$fieldConfig['eval'])))) {
    $whereParts[] = sprintf($format, $fieldName, $like);
}

I have a user function in eval. The name of this function is 'tx_.....datenbank..._id'.
The condition

'!preg_match('/date|time|int/',$fieldConfig['eval'])'

find string 'date' in this name, and so fails including this field in the querystring.

Actions

Also available in: Atom PDF