Project

General

Profile

Actions

Bug #40816

closed

Livesearch fails when TCA setting 'sortby' exists but is empty

Added by Loek Hilgersom about 12 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
Start date:
2012-09-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions

Also available in: Atom PDF