Bug #40816

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

Added by Loek Hilgersom over 8 years ago. Updated over 3 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.

#1

Updated by Gerrit Code Review over 8 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

#2

Updated by Gerrit Code Review over 8 years ago

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

#3

Updated by Gerrit Code Review over 8 years ago

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

#4

Updated by Gerrit Code Review over 8 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

#5

Updated by Loek Hilgersom over 8 years ago

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

Updated by Philipp Gampe almost 8 years ago

I cannot reproduce this on 4.5. Please add detailed testing instructions.

#7

Updated by Loek Hilgersom almost 8 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!

#8

Updated by Riccardo De Contardi over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF