Bug #93289
closedDefVals not working for MM-relations
100%
Description
Adding records as default values does not work for TCA type=group with internal_type=db and configured MM-relation.
Not working:
&defVals[tx_ext_domain_model_foo][bars]=tx_ext_domain_model_bar_1,tx_ext_domain_model_bar_3
I looked into it and found out, that the vanilla uid of the record is passed as MMuid to the RelationHandler. This leads to a database lookup of the not yet persisted record relation and an empty result. Passing 0 leads to the desired list reading and correct fetching.
I suggest changing this line to something like
$result['command'] === 'new' ? 0 : $result['databaseRow']['uid'];
Updated by Gerrit Code Review almost 4 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/+/67447
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/+/67447
Updated by Gerrit Code Review over 3 years ago
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/+/68870
Updated by Gerrit Code Review over 3 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68871
Updated by Maik no-lastname-given over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 51baaa8862ba96f9b25ee4f0c835696a7cc35eb3.