#104194File move flash message does not display previous location
Description
When moving a file using default clipboard in v12, the success message contains the destination path as source path too. It should display the old path. See screenshot.
Text translation:
> File “[…]” moved to “[…]”.
Reviews 2
Files 1
History 35
-
Georg Ringer commented and changed status
NewAccepted 06/24/24, 15:26 -
Gerrit Code Review pushed patch set 1 for main to change 84923 status
AcceptedUnder Review 06/26/24, 03:05 -
Gerrit Code Review pushed patch set 1 for 12.4 to change 85112 07/04/24, 08:23
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % 07/04/24, 08:25Applied in changeset commit:140b0d88686e8f42df893c922756e5c8903ffae7.
-
Benni Mack changed status
ResolvedClosed 07/09/24, 15:39
patch would be
diff --git a/typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php b/typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php index 537b3e01b1..bae65814fb 100644 --- a/typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php +++ b/typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php @@ -691,6 +691,7 @@ class ExtendedFileUtility extends BasicFileUtility // Moving the file if ($sourceFileObject instanceof File) { try { + $sourcePath = $sourceFileObject->getIdentifier(); if ($alternativeName !== '') { // Don't allow overwriting existing files, but find a new name $resultObject = $sourceFileObject->moveTo($targetFolderObject, $alternativeName, DuplicationBehavior::RENAME); @@ -698,8 +699,8 @@ class ExtendedFileUtility extends BasicFileUtility // Don't allow overwriting existing files $resultObject = $sourceFileObject->moveTo($targetFolderObject, null, DuplicationBehavior::CANCEL); } - $this->writeLog(SystemLogFileAction::MOVE, SystemLogErrorClassification::MESSAGE, 'File "{identifier}" moved to "{destination}"', ['identifier' => $sourceFileObject->getIdentifier(), 'destination' => $resultObject->getIdentifier()]); - $this->addMessageToFlashMessageQueue('FileUtility.FileMovedTo', [$sourceFileObject->getIdentifier(), $resultObject->getIdentifier()], ContextualFeedbackSeverity::OK); + $this->writeLog(SystemLogFileAction::MOVE, SystemLogErrorClassification::MESSAGE, 'File "{identifier}" moved to "{destination}"', ['identifier' => $sourcePath, 'destination' => $sourceFileObject->getIdentifier()]); + $this->addMessageToFlashMessageQueue('FileUtility.FileMovedTo', [$sourcePath, $sourceFileObject->getIdentifier()], ContextualFeedbackSeverity::OK); } catch (InsufficientUserPermissionsException $e) { $this->writeLog(SystemLogFileAction::MOVE, SystemLogErrorClassification::USER_ERROR, 'You are not allowed to move files'); $this->addMessageToFlashMessageQueue('FileUtility.YouAreNotAllowedToMoveFiles');will push later