Actions
Bug #104194
closedFile move flash message does not display previous location
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2024-06-24
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
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 "[…]".
Files
Updated by Georg Ringer 5 months ago
- Status changed from New to Accepted
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
Updated by Gerrit Code Review 5 months ago
- Status changed from Accepted to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84923
Updated by Gerrit Code Review 5 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85112
Updated by Georg Ringer 5 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 140b0d88686e8f42df893c922756e5c8903ffae7.
Actions