[BUGFIX] Show correct default value of field type 'select' and MM relation 74/33474/3
authorGeorg Ringer <georg.ringer@gmail.com>
Wed, 22 Oct 2014 14:00:45 +0000 (16:00 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Mon, 15 Dec 2014 19:52:59 +0000 (20:52 +0100)
Given a field with TCA type "select" and a mm relation,
the selected categories of the default record are not shown
in the translated record.

Reason is because the uid is not transferred to the
BackendUtility::getProcessedValue method.

Resolves: #62397
Releases: master, 6.2
Change-Id: I4c98267e9d246c9b7efeaba2cdcecd7873e9feeb
Reviewed-on: http://review.typo3.org/33474
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/backend/Classes/Form/FormEngine.php

index 5aafcd1..cfdde0d 100644 (file)
@@ -2134,7 +2134,7 @@ class FormEngine {
         */
        public function renderDefaultLanguageContent($table, $field, $row, $item) {
                if (is_array($this->defaultLanguageData[$table . ':' . $row['uid']])) {
-                       $defaultLanguageValue = BackendUtility::getProcessedValue($table, $field, $this->defaultLanguageData[$table . ':' . $row['uid']][$field], 0, 1);
+                       $defaultLanguageValue = BackendUtility::getProcessedValue($table, $field, $this->defaultLanguageData[$table . ':' . $row['uid']][$field], 0, 1, FALSE, $this->defaultLanguageData[$table . ':' . $row['uid']]['uid']);
                        $fieldConfig = $GLOBALS['TCA'][$table]['columns'][$field];
                        // Don't show content if it's for IRRE child records:
                        if ($fieldConfig['config']['type'] != 'inline') {