Project

General

Profile

Actions

Bug #89430

closed

Copying directory in FileList throws exception

Added by Sebastian Müller about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-10-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This bug is only present in TYPO3 9.5.10. If I go back to 9.5.9, the bug is not there.

When in Filelist backend module you get an exception if you copy any directory. Even as admin user.

It is claiming that the file does not excist

#1314516809 InvalidArgumentException
File /user_upload/test/blub/ does not exist.

in /var/www/typo3/test/web/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php line 263
        $absoluteFilePath = $this->getAbsolutePath($fileIdentifier);
        // don't use $this->fileExists() because we need the absolute path to the file anyways, so we can directly
        // use PHP's filesystem method.
        if (!file_exists($absoluteFilePath) || !is_file($absoluteFilePath)) {
            throw new \InvalidArgumentException('File ' . $fileIdentifier . ' does not exist.', 1314516809);
        }

        $dirPath = PathUtility::dirname($fileIdentifier);
        $dirPath = $this->canonicalizeAndCheckFolderIdentifier($dirPath);

This error exists until you clean your userdata since the copy is saved.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #88969: Clipboard in filelist generates broken links for exportClosed2019-08-16

Actions
Has duplicate TYPO3 Core - Bug #89437: Can not cut folder in filelist since 8.7.28Closed2019-10-17

Actions
Actions #1

Updated by Sebastian Müller about 5 years ago

  • Description updated (diff)
Actions #2

Updated by Sebastian Müller about 5 years ago

  • Related to Bug #85425: Check the copy permissions correctly added
Actions #3

Updated by Sebastian Müller about 5 years ago

  • Related to deleted (Bug #85425: Check the copy permissions correctly)
Actions #4

Updated by Sebastian Müller about 5 years ago

Error comes with this change

https://git.typo3.org/Packages/TYPO3.CMS.git/blobdiff/fa083dfa8e7e4b98a619b8f42340d307d1188ac5..b4976b9938fd29c648379acab6cfd05567d61c96:/typo3/sysext/backend/Classes/Clipboard/Clipboard.php

There is no check if it is a file or directory so the call

ResourceFactory::getInstance()->getFileObjectFromCombinedIdentifier($v)

will go to web/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php

where a check for "is it a file"

        if (!file_exists($absoluteFilePath) || !is_file($absoluteFilePath)) {

will throw an exception for not being a file

Actions #5

Updated by Sebastian Müller about 5 years ago

  • Related to Bug #88969: Clipboard in filelist generates broken links for export added
Actions #6

Updated by Gerrit Code Review about 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62005

Actions #7

Updated by Gerrit Code Review about 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62005

Actions #8

Updated by Andreas Kienast about 5 years ago

  • Has duplicate Bug #89437: Can not cut folder in filelist since 8.7.28 added
Actions #9

Updated by Gerrit Code Review about 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62005

Actions #10

Updated by Gerrit Code Review about 5 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61981

Actions #11

Updated by Gerrit Code Review about 5 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61982

Actions #12

Updated by Andreas Fernandez about 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF