[BUGFIX] Create workspace placeholder with processed field content 40/22940/4
authorSascha Egerer <sascha.egerer@dkd.de>
Wed, 7 Aug 2013 19:27:08 +0000 (21:27 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 11 Oct 2013 14:48:32 +0000 (16:48 +0200)
The field content that is used for the workspace placeholder records
is not processed through the field configuration.

This produces annoying error messages to the user.

Resolves: #17551
Releases: 6.2, 6.1, 6.0

Change-Id: I79823cc2bd0d26a03b0850045c08999ebdbc1a9b
Reviewed-on: https://review.typo3.org/22940
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 9c3b988..2e38d75 100644 (file)
@@ -1138,11 +1138,12 @@ class DataHandler {
                                                        if ($status == 'new' && $table == 'pages' && is_array($TSConfig['permissions.'])) {
                                                                $fieldArray = $this->setTSconfigPermissions($fieldArray, $TSConfig['permissions.']);
                                                        }
+                                                       // Processing of all fields in incomingFieldArray and setting them in $fieldArray
+                                                       $fieldArray = $this->fillInFieldArray($table, $id, $fieldArray, $incomingFieldArray, $theRealPid, $status, $tscPID);
                                                        if ($createNewVersion) {
+                                                               // create a placeholder array with already processed field content
                                                                $newVersion_placeholderFieldArray = $fieldArray;
                                                        }
-                                                       // Processing of all fields in incomingFieldArray and setting them in $fieldArray
-                                                       $fieldArray = $this->fillInFieldArray($table, $id, $fieldArray, $incomingFieldArray, $theRealPid, $status, $tscPID);
                                                        // NOTICE! All manipulation beyond this point bypasses both "excludeFields" AND possible "MM" relations / file uploads to field!
                                                        // Forcing some values unto field array:
                                                        // NOTICE: This overriding is potentially dangerous; permissions per field is not checked!!!