[BUGFIX] Field size of t3ver_label too low 66/30466/2
authorOliver Hader <oliver@typo3.org>
Wed, 28 May 2014 09:28:04 +0000 (11:28 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Thu, 12 Jun 2014 16:14:58 +0000 (18:14 +0200)
During workspace move operations sometimes a warning like
this can be found:

  102: These fields are not properly updated in database:
  (t3ver_label) Probably value mismatch with fieldtype.

The reason is, that the t3ver_label field in almost every
record is limited to 30 characters in the SQL definition.
Besides that the error code "102" of the mentioned warning
is invalid and should just be "1" to be recognized by the
accordant functional tests as well.

Resolves: #59110
Releases: 6.2
Change-Id: Ia97a32dbefd1d27e33f186c19c5a6a495dcc194a
Reviewed-on: https://review.typo3.org/30466
Reviewed-by: Wouter Wolters
Reviewed-by: Krzysztof Adamczyk
Reviewed-by: Marcin SÄ…gol
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/version/Classes/Hook/DataHandlerHook.php

index 41f93e2..0bd8877 100644 (file)
@@ -6040,7 +6040,7 @@ class DataHandler {
                                }
                                // Set log message if there were fields with unmatching values:
                                if (count($errorString)) {
-                                       $this->log($table, $id, $action, 0, 102, 'These fields are not properly updated in database: (' . implode(',', $errorString) . ') Probably value mismatch with fieldtype.');
+                                       $this->log($table, $id, $action, 0, 1, 'These fields are not properly updated in database: (' . implode(',', $errorString) . ') Probably value mismatch with fieldtype.');
                                }
                                // Return selected rows:
                                return $row;
index 92a7f5a..9b2dfa7 100644 (file)
@@ -298,7 +298,7 @@ class DataHandlerHook {
                        ) {
                                // Create version of record first, if it does not exist
                                if (empty($WSversion['uid'])) {
-                                       $tcemainObj->versionizeRecord($table, $uid, 'Placeholder version for moving record');
+                                       $tcemainObj->versionizeRecord($table, $uid, 'MovePointer');
                                        $WSversion = BackendUtility::getWorkspaceVersionOfRecord($tcemainObj->BE_USER->workspace, $table, $uid, 'uid,t3ver_oid');
                                        $this->moveRecord_processFields($tcemainObj, $resolvedPid, $table, $uid);
                                // If the record has been versioned before (e.g. cascaded parent-child structure), create only the move-placeholders
@@ -1280,7 +1280,7 @@ class DataHandlerHook {
                                $newVersion_placeholderFieldArray['perms_group'] = $access['perms_group'];
                                $newVersion_placeholderFieldArray['perms_everybody'] = $access['perms_everybody'];
                        }
-                       $newVersion_placeholderFieldArray['t3ver_label'] = 'MOVE-TO PLACEHOLDER for #' . $uid;
+                       $newVersion_placeholderFieldArray['t3ver_label'] = 'MovePlaceholder #' . $uid;
                        $newVersion_placeholderFieldArray['t3ver_move_id'] = $uid;
                        // Setting placeholder state value for temporary record
                        $newVersion_placeholderFieldArray['t3ver_state'] = (string)new VersionState(VersionState::MOVE_PLACEHOLDER);