Bug #40816
closedLivesearch fails when TCA setting 'sortby' exists but is empty
100%
Description
Livesearch fails with an ExtDirect SQL error if a searchable table contains a TCA setting for sortby like this:
TCA['tablename']['ctrl']['sortby'] = '';
This happens e.g. with tx_news:
'sortby' => ($configuration->getManualSorting() ? 'sorting' : '')
Livesearch adds an empty ' ORDER BY ' to the query and throws an SQL error.
Fix:
LiveSearch::makeOrderByTable() should not just check if 'sortby' key exists in TCA, but also check if the containing string is not empty (strlen>0).
I'll post the patch to gerrit a.s.a.p.
Updated by Gerrit Code Review almost 12 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14526
Updated by Gerrit Code Review almost 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14526
Updated by Gerrit Code Review almost 12 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14526
Updated by Gerrit Code Review almost 12 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/15368
Updated by Loek Hilgersom almost 12 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset af5d5899af6c1e2814cf3ef07eecb105e0661fc9.
Updated by Philipp Gampe over 11 years ago
I cannot reproduce this on 4.5. Please add detailed testing instructions.
Updated by Loek Hilgersom over 11 years ago
Hey Philipp,
I checked and found that this issue has only recently been merged into 4.5 and will be released with 4.5.27. It did go into all the other branches quite a while ago, maybe that's the confusion.
I guess this issue can be closed then.
Thanks!
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Resolved to Closed