Project

General

Profile

Actions

Bug #93289

closed

DefVals not working for MM-relations

Added by Maik no-lastname-given almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2021-01-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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'];
Actions #1

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

Actions #2

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

Actions #3

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

Actions #4

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

Actions #5

Updated by Maik no-lastname-given over 3 years ago

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

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF