Bug #33700
closedInvalid behavior of search for integer in Backend search
100%
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
Updated by Francois Suter about 12 years ago
- File issue33700.diff issue33700.diff added
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.
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.
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.
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?
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 :-)
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
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
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
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
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
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
Updated by Soren Malling over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 7e443bd4362dd9d40188a04caefadfb005ac6be1.
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
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
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
Updated by Soren Malling over 11 years ago
- Status changed from Under Review to Resolved
Applied in changeset 7c02b0c232f4a7244c7a08e391ef450a12e01e80.