Actions
Bug #83268
closedQueryGenerator can't deal with multiple alt labels
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2017-12-09
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
9
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
The QueryGenerator::makeOptionList function reads the label_alt
field and uses it as a select field for a db query, forgetting that label_alt may contain multiple field names separated by commas. This leads to an invalid select field name and hence a db error, if the alternative label list does contain a comma.
$altLabelField = $GLOBALS['TCA'][$from_table]['ctrl']['label_alt'];
…
if ($altLabelField) {
$selectFields[] = $altLabelField;
}
$queryBuilder->select(...$selectFields)
https://docs.typo3.org/typo3cms/TCAReference/Ctrl/Index.html#label-alt
I discovered this bug while trying to edit a Direct Mail recipient list, based on a special query, based on the tt_address
table with a custom select field referring to the static_country_zones
table. That table has label_alt
'zn_name_local,zn_code'
.
Actions