[BUGFIX] Some TCAdefaults work only with "Page (inside)" 00/20900/2
authorWouter Wolters <typo3@wouterwolters.nl>
Sat, 18 May 2013 15:45:17 +0000 (17:45 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Sun, 26 May 2013 14:49:41 +0000 (16:49 +0200)
Some TCAdefaults work only with "Page (inside)" and not in
the wizard.

Affected defaults:
* TCAdefaults.pages.hidden = 1
* TCAdefaults.pages.doktype = 2

Change-Id: I71eb301909c31eb8cd160dbe6beadc4ba5102b66
Resolves: #14955
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Reviewed-on: https://review.typo3.org/20900
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/backend/Classes/Form/DataPreprocessor.php

index 1a2021b..7ff58e9 100644 (file)
@@ -169,7 +169,7 @@ class DataPreprocessor {
                                                                // Gets the list of fields to copy from the previous record.
                                                                $fArr = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['useColumnsForDefaultValues'], 1);
                                                                foreach ($fArr as $theF) {
-                                                                       if (isset($GLOBALS['TCA'][$table]['columns'][$theF])) {
+                                                                       if (isset($GLOBALS['TCA'][$table]['columns'][$theF]) && !isset($newRow[$theF])) {
                                                                                $newRow[$theF] = $row[$theF];
                                                                        }
                                                                }