Issue Bug Rejected

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

Dragan Tomic 12/06/16, 10:04 updated 12/07/16, 08:19

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.