[BUGFIX] Inline records get pid=0 95/42095/2
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Wed, 29 Jul 2015 14:08:56 +0000 (16:08 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Wed, 29 Jul 2015 14:18:19 +0000 (16:18 +0200)
The FormEngine refactoring introduced a typo that leads
to inline records ending up with pid=0 in case of pages
translation (media field entries).

Find detailed description in the issue.

Change-Id: I953e8a561dc8c4051c7780dfa1e943afbd75c040
Resolves: #68623
Releases: master
Reviewed-on: http://review.typo3.org/42095
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Josef Glatz <jousch@gmail.com>
Tested-by: Josef Glatz <jousch@gmail.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/backend/Classes/Form/InlineRelatedRecordResolver.php

index 4e5ff27..77e2ad7 100644 (file)
@@ -99,6 +99,8 @@ class InlineRelatedRecordResolver {
                                        $foreignTranslationPointerField = $GLOBALS['TCA'][$foreignTable]['ctrl']['transOrigPointerField'];
                                }
                                // Duplicate child records of default language in form
+                               // this case becomes true for the pages translation, in case the default language
+                               // record has entries in media field.
                                foreach ($recordsOriginal as $record) {
                                        if (!empty($foreignLanguageField)) {
                                                $record[$foreignLanguageField] = $language;
@@ -108,7 +110,7 @@ class InlineRelatedRecordResolver {
                                        }
                                        $newId = uniqid('NEW', TRUE);
                                        $record['uid'] = $newId;
-                                       $record['pid'] = $$inlineFirstPid;
+                                       $record['pid'] = $inlineFirstPid;
                                        $relatedRecords['records'][$newId] = $record;
                                }
                        }