Bug #83268
closedQueryGenerator can't deal with multiple alt labels
100%
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'
.
Updated by Hannes Lau almost 7 years ago
- Related to Task #75545: Doctrine DBAL migration added
Updated by Hannes Lau almost 7 years ago
- Related to deleted (Task #75545: Doctrine DBAL migration)
Updated by Hannes Lau almost 7 years ago
- Related to Task #77564: Doctrine: Migrate QueryGenerator added
Updated by Susanne Moog almost 7 years ago
- Category set to Database API (Doctrine DBAL)
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70057
Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70057
Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70057
Updated by Gerrit Code Review over 3 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70057
Updated by Gerrit Code Review over 3 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70057
Updated by Gerrit Code Review over 3 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70057
Updated by Gerrit Code Review over 3 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70057
Updated by Krzysztof Gutkowski over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ab1d989c53a4f374bcf32b508d8d6247ef9f8199.
Updated by Gerrit Code Review about 3 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70837
Updated by Krzysztof Gutkowski about 3 years ago
- Status changed from Under Review to Resolved
Applied in changeset 447b8ee3267962503720c900567c1eeffaf2b167.