Project

General

Profile

Actions

Bug #33700

closed

Invalid behavior of search for integer in Backend search

Added by Xavier Perseguers about 12 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2012-02-06
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
5.3
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

Backend search (and Live search once #31761 has been merged) do not behave as stated in the 4.6 Release notes (http://wiki.typo3.org/TYPO3_4.6#Live_Search):

In previous TYPO3 versions, there were several problems with Backend search:

  • ...
  • it searched "uid" and other numeric fields even if the value was not numeric
  • it used LIKE x search on numeric fields
  • ...

In fact current implementation does not replace the LIKE operator with an SQL equal statement for numeric fields but whenever a query that can be interpreted as integer is encountered, regardless of the underlying column type.

Example: If you have pages "102 W", "102 E", you used to be able to search for "102" and get them, but now the query is casted to an integer and the page title is search for an equality on "102" resulting in an empty result list.

The underlying column type should be used instead (code to cache this information is already available within DBAL and Helmut started months ago to backport it to Core itself: #28654).


Files

issue33700.diff (1.35 KB) issue33700.diff Francois Suter, 2012-02-09 15:15

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #31761: Live search does not implement search propertiesClosedFrancois Suter2011-11-11

Actions
Related to TYPO3 Core - Task #28654: Move field info caching to coreRejected2011-08-01

Actions
Has duplicate TYPO3 Core - Bug #42177: Backend-Search: Using search-words which can be interpreted as integer.Closed2012-10-19

Actions
Actions #1

Updated by Francois Suter about 12 years ago

Xavier, here's a patch for this issue. I'm not sure what you meant about the caching stuff, but it doesn't seem to be committed yet, but the bug still needs to be fixed. Therefore I wanted your opinion before pushing this patch for review.

Actions #2

Updated by Francois Suter about 12 years ago

NOTE: this patch is only for live search, if you agree with it, I'll adapt it for BE search too.

Actions #3

Updated by Dmitri Pisarev almost 12 years ago

Why isn't this patch commited yet, not even in 4.7?
I have a table with date field that I used to search with strings as '20120510' and now it just does not work. This search ability is crucial to my site editors.
Had to temporary fix it by hand.

Please commit! And also in BE search.

Actions #4

Updated by Felix Kopp almost 12 years ago

I don't know if this patch also solves this problem:
string fields containing just numbers will not be found via live search.

Example:
If page title '112' can not be found via live search.
Search interpretes input as int and does not look into string fields, right?

Actions #5

Updated by Marco Bresch almost 12 years ago

Hi all,
tested this patch successfully in live search. My testcase was to search a zipcode in feusers. Without the patch the feuser was not found and with the patch the feuser was found.

Greetings
Marco :-)

Actions #6

Updated by Mads Jensen over 11 years ago

The patch really needs to be committed for both live search and regular BE search. For us, searching in BE is, unfortunately, pretty much useless as is.

For some reason I'm not able to fix it by XCLASSing (modified classes are not loaded), and with no hooks, I'm left with modifying the core directly.

EDIT: We're currently using TYPO3 v4.7.2

Regards
Mads

Actions #7

Updated by Gerrit Code Review over 11 years ago

  • Status changed from New to Under Review

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13990

Actions #8

Updated by Gerrit Code Review over 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13990

Actions #9

Updated by Gerrit Code Review over 11 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13990

Actions #10

Updated by Gerrit Code Review over 11 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13990

Actions #11

Updated by Gerrit Code Review over 11 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13990

Actions #12

Updated by Soren Malling over 11 years ago

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

Updated by Gerrit Code Review over 11 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/16476

Actions #14

Updated by Gerrit Code Review over 11 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/16477

Actions #15

Updated by Gerrit Code Review over 11 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/16479

Actions #16

Updated by Soren Malling over 11 years ago

  • Status changed from Under Review to Resolved
Actions #17

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF