[BUGFIX] Some TCAdefaults work only with "Page (inside)" 67/21067/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:59:16 +0000 (16:59 +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/21067
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/backend/Classes/Form/DataPreprocessor.php

index 106eef8..81a1f5f 100644 (file)
@@ -166,7 +166,7 @@ class DataPreprocessor {
                                                                // Gets the list of fields to copy from the previous record.
                                                                $fArr = \TYPO3\CMS\Core\Utility\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];
                                                                        }
                                                                }