[BUGFIX] Adding new IRRE child on new localizable parent fails 71/43171/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 10 Sep 2015 12:12:11 +0000 (14:12 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 10 Sep 2015 12:47:53 +0000 (14:47 +0200)
Resolves: #69646
Releases: master
Change-Id: I2ff6ac68705bea299ba3872eca836d3ac1462d35
Reviewed-on: http://review.typo3.org/43171
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/Controller/FormInlineAjaxController.php

index 45d00a3..2356077 100644 (file)
@@ -231,7 +231,7 @@ class FormInlineAjaxController {
                                }
                        }
                        // Set language of new child record to the language of the parent record:
-                       if ($parent['localizationMode'] === 'select') {
+                       if ($parent['localizationMode'] === 'select' && MathUtility::canBeInterpretedAsInteger($parent['uid'])) {
                                $parentRecord = $inlineRelatedRecordResolver->getRecord($parent['table'], $parent['uid']);
                                $parentLanguageField = $GLOBALS['TCA'][$parent['table']]['ctrl']['languageField'];
                                $childLanguageField = $GLOBALS['TCA'][$current['table']]['ctrl']['languageField'];