Project

General

Profile

Actions

Bug #78896

closed

Replace file feature for FAL file list - doesn't work if storage id is not 1

Added by Dragan Tomic over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2016-12-06
Due date:
% Done:

0%

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

Description

There is an error in the REPLACE file feature in FAL.
System storage UID is hard-coded to 1.

typo3/sysext/core/Classes/Utility/File/ ExtendedFileUtility.php line 1076:
$folder = $resourceFactory->getFolderObjectFromCombinedIdentifier('1:'.$fileObject->getParentFolder()->getIdentifier());

In big percentage, we are using auto created 'fileadmin' but here is obvious that this code will not work for any other Storage except fileadmin with UID 1.
Here I would read the storage from file object.

If you have situation like on picture attached this will not work for you.

Please check provided patch.


Files

Screen Shot 2016-12-06 at 09.48.15.png (23.7 KB) Screen Shot 2016-12-06 at 09.48.15.png System Storage where you can reproduce the error Dragan Tomic, 2016-12-06 10:04
patch_file_replace.diff (1.68 KB) patch_file_replace.diff Patch file Dragan Tomic, 2016-12-06 10:04

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #56133: Replace file feature for fal file listClosed2014-02-19

Actions
Actions

Also available in: Atom PDF