Project

General

Profile

Actions

Feature #45498

closed

Find best-matching local storage instead of default-storage

Added by Stefan Neufeind over 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2013-02-15
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

If a "legacy" file/folder is to be accessed (no storage-uid given) usually the default-storage will be used. But for example the Filelist-module will default to using the auto-created fileadmin-storage (Local-driver). All files added/changed will be indexed in sys_file for that respective storage and not the default-storage (ID 0). So we save us a lot of trouble to also try to use a best-matching storage (fileadmin or maybe also for other paths) instead of using the default-storage (legacy-storage).


Related issues 1 (0 open1 closed)

Blocks TYPO3 Core - Bug #52173: Wrong storage is selected if file is outside of available storagesClosed2013-09-22

Actions
Actions #1

Updated by Gerrit Code Review over 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290

Actions #2

Updated by Gerrit Code Review about 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290

Actions #3

Updated by Gerrit Code Review about 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290

Actions #4

Updated by Gerrit Code Review about 11 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290

Actions #5

Updated by Gerrit Code Review almost 11 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290

Actions #6

Updated by Gerrit Code Review almost 11 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290

Actions #7

Updated by Gerrit Code Review almost 11 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290

Actions #8

Updated by Gerrit Code Review almost 11 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290

Actions #9

Updated by Gerrit Code Review almost 11 years ago

Patch set 9 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290

Actions #10

Updated by Stefan Neufeind almost 11 years ago

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

Updated by Gerrit Code Review over 10 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/23291

Actions #12

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/23292

Actions #13

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/23557

Actions #14

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/23560

Actions #15

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/23557

Actions #16

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/23560

Actions #17

Updated by Gerrit Code Review over 10 years ago

Patch set 3 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/23560

Actions #18

Updated by Gerrit Code Review over 10 years ago

Patch set 3 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/23557

Actions #19

Updated by Stefan Neufeind over 10 years ago

  • Status changed from Under Review to Resolved
Actions #20

Updated by aimcom no-lastname-given over 10 years ago

In one of my TYPO3 projects, I ran into a major issue which is related to this new method findBestMatchingStorageByLocalPath(&$localPath). The image rendering doesn't work any more if an image is not located in one of the configured file storages.

Example

I have configured two different file storages: fileadmin/user_upload/ and uploads/. After that, I created an empty page with a TypoScript template which contains:

page.10 = IMAGE
page.10.file = fileadmin/images/dummy.png

In TYPO3 6.1.4, the method getFileObjectFromCombinedIdentifier($identifier) returned the correct file object, but in TYPO3 6.1.5, this doesn't work any more because the method findBestMatchingStorageByLocalPath(&$localPath) returns the file storage for fileadmin/user_upload/, but the image is located in fileadmin/images/.

Question / Conclusion

What I don't know now is if this is a bug or not. Is it true that you can only use files with the cObject IMAGE if they are located in a local storage since TYPO3 6.1.5 or is there something wrong with the functionality of findBestMatchingStorageByLocalPath(&$localPath)? I think that the call of PathUtility::getCommonPrefix(array($basePath, $localPath)); in findBestMatchingStorageByLocalPath(&$localPath) might be the source of my problem.

Any help is appreciated, thank you.

Actions #21

Updated by Markus Klein over 10 years ago

The findBestMatchingStorageByLocalPath() method simply does not check whether the file requested actually exists in the selected storage!

Actions #22

Updated by Markus Klein over 10 years ago

Moved to a separate issue: http://forge.typo3.org/issues/52173

Actions #23

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF