[BUGFIX] Saving fal relation fails 74/43174/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 10 Sep 2015 14:10:53 +0000 (16:10 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 10 Sep 2015 18:12:17 +0000 (20:12 +0200)
Resolves: #69652
Releases: master
Change-Id: I941ff6508cf5c4c2315018665b1f8050489058b7
Reviewed-on: http://review.typo3.org/43174
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php

index 3b61544..e6708da 100644 (file)
@@ -267,8 +267,12 @@ class InlineRecordContainer extends AbstractContainer {
                $options = $formDataCompiler->compile($formDataCompilerInput);
                $options['renderType'] = 'fullRecordContainer';
 
-               if (!MathUtility::canBeInterpretedAsInteger($row['uid'])) {
-                       $options['databaseRow']['uid'] = $row['uid'];
+               // @todo: This hack merges data from already prepared row over fresh row again.
+               // @todo: This really must fall ...
+               foreach ($row as $field => $value) {
+                       if ($command === 'new' && is_string($value) && $value !== '' && array_key_exists($field, $options['databaseRow'])) {
+                               $options['databaseRow'][$field] = $value;
+                       }
                }
 
                return $this->nodeFactory->create($options)->render();