Project

General

Profile

Actions

Bug #18411

closed

Backend search (list module) is restricted to hardcoded TCA field types

Added by Rainer Kuhn about 16 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2008-03-10
Due date:
% Done:

0%

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

Description

The backend search in the backend's list module is restricted to text and input fields (input fields only if not eval'ed to 'date|time|int'), read-only fields of type 'none' are not consider by the search. Setting a field type to 'none' in TCA to make a text field read-only in the backend form should not prevent fields from being searched.

This restriction is hardcoded in method recordList::makeSearchString() of of class.db_list.inc (line 497 ff.):

[...]
// Initialize field array:
$sfields=array();
$sfields[]='uid'; // Adding "uid" by default.

// Traverse the configured columns and add all columns that can be searched:
foreach($TCA[$table]['columns'] as $fieldName => $info) {
if ($info['config']['type']=='text' || ($info['config']['type']=='input' && !ereg('date|time|int',$info['config']['eval']))) {
$sfields[]=$fieldName;
}
}
[...]

There are several possibilities to change this behaviour (respective to allow individual search fields for the developer):
1) Add '$info['config']['type']=='none' to the above mentioned condition for retrieving the search fields - but this is still not very flexible
2) Add a hook to manipulate $sfields in recordList::makeSearchString()
3) Extending the TCA in a backwards compatible way, e.g. with a config 'searchable' for non-text/non-input fields?

Adding at hook as a first step could add a ot of flexibilty for developers.

Best regards,
Rainer

(issue imported from #M7807)

Actions #1

Updated by Rainer Kuhn about 16 years ago

Currently the only possibilty to manipulate this is XCLASSing of the classes localRecordList (for default backend list view) and TBE_browser_recordList (for element browser popup record list). I really would like to avoid XCLASSinf for the well-known reasons...

Actions #2

Updated by Alexander Opitz almost 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

As this report is very old, is the handling in newer TYPO3 CMS Versions (like 6.0/6.1) more like you expect it?

Actions #3

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

No feedback for over 90 days.

Actions

Also available in: Atom PDF