[TASK] FormEngine: Remove foreign_selector handling in ajax 92/43992/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 11 Oct 2015 17:45:41 +0000 (19:45 +0200)
committerMathias Schreiber <mathias.schreiber@wmdb.de>
Sun, 11 Oct 2015 18:27:08 +0000 (20:27 +0200)
The default values are now handled by DatabaseRowInitializeNew
provider and the following provider will then process the
field automatically. No need to set this anymore.

Resolves: #70594
Releases: master
Change-Id: I3554c2736275c283b525497c6f1f336d44b06549
Reviewed-on: http://review.typo3.org/43992
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php

index 25e8474..33466ca 100644 (file)
@@ -190,23 +190,6 @@ class FormInlineAjaxController
                 ];
                 $childData['combinationChild'] = $formDataCompiler->compile($formDataCompilerInput);
             }
-        } elseif ($parentConfig['foreign_selector'] && $childChildUid) {
-            // @todo: Setting these values here is too late, it should happen before single fields are
-            // @todo: prepared in $childData. Otherwise fields that use this relation like for instance
-            // @todo: the placeholder relation does not work for "fresh" children. This stuff here
-            // @todo: probably needs to be moved somewhere after "initializeNew" data provider.
-            // There is an existing child-child, but it should not be rendered directly since useCombination
-            // is off. Still, the intermediate record must point to the child table
-            if ($childData['processedTca']['columns'][$parentConfig['foreign_selector']]['config']['type'] === 'select') {
-                $childData['databaseRow'][$parentConfig['foreign_selector']] = [
-                    $childChildUid,
-                ];
-            }
-            // This is the case for fal, uid_local is a group field in sys_file_reference
-            if ($childData['processedTca']['columns'][$parentConfig['foreign_selector']]['config']['type'] === 'group') {
-                $childData['databaseRow'][$parentConfig['foreign_selector']]
-                    = $childData['processedTca']['columns'][$parentConfig['foreign_selector']]['config']['allowed'] . '_' . $childChildUid;
-            }
         }
 
         $childData['inlineParentUid'] = (int)$parent['uid'];