Livesearch fails when TCA setting 'sortby' exists but is empty
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.
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 Loek Hilgersom over 10 years ago
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.