Project

General

Profile

Actions

Bug #43114

closed

sanitizeSelectPart - select CONTENT using DISTINCT

Added by GAYA La Nouvelle Agence about 12 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2012-11-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

Hi,

I've encounter a problem while upgrading to 4.5.22. The sanitizeSelectPart() method was introduced (backported from 4.6 I think) and poses a new problem while using DISTINCT directive. Ex :

test = CONTENT
test {
table = tx_test
select.selectFields = DISTINCT as test
}

The sanitizeSelectPart method will add uid and pid in select clause and so... it won't do what we expect
I saw that some exception was already introduced (count|max|min|avg|sum). Adding distinct will solved the problem.

I don't understand why these "necessaryFields" (uid, pid) were introduced cause in many cases they are not necessary, but this method doesn't smell good and adding some exceptions like it was already done smell worse...


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #34152: stdWrap function numRows() fails in 4.6 due to wrong SELECT clauseClosedErnesto Baschny2012-02-21

Actions
Actions

Also available in: Atom PDF