Feature #45498
Find best-matching local storage instead of default-storage
Status: | Resolved | Start date: | 2013-02-15 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Stefan Neufeind | % Done: | 100% |
|
Category: | File Abstraction Layer (FAL) | Spent time: | - | |
Target version: | - | |||
PHP Version: | Sprint Focus: | |||
Complexity: |
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
Associated revisions
[FEATURE] Find best-matching local storage instead of default-storage
If no storage-UID is given usually the default-storage will be
used ("legacy-storage"). Some problems with not up-to-date
index-records etc. can be prevented by using a matching storage
instead of falling back to the default-storage (ID 0).
Implement search for best matching storage.
Resolves: #45498
Releases: 6.2
Change-Id: Ife00d68314fe43804227bb26280d0d475cbaf10b
Reviewed-on: https://review.typo3.org/18290
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
[FEATURE] Find best-matching local storage instead of default-storage
If no storage-UID is given usually the default-storage will be
used ("legacy-storage"). Some problems with not up-to-date
index-records etc. can be prevented by using a matching storage
instead of falling back to the default-storage (ID 0).
Implement search for best matching storage.
Resolves: #45498
Releases: 6.0, 6.1, 6.2
Change-Id: Ife00d68314fe43804227bb26280d0d475cbaf10b
Reviewed-on: https://review.typo3.org/23557
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[FEATURE] Find best-matching local storage instead of default-storage
If no storage-UID is given usually the default-storage will be
used ("legacy-storage"). Some problems with not up-to-date
index-records etc. can be prevented by using a matching storage
instead of falling back to the default-storage (ID 0).
Implement search for best matching storage.
Resolves: #45498
Releases: 6.0, 6.1, 6.2
Change-Id: Ife00d68314fe43804227bb26280d0d475cbaf10b
Reviewed-on: https://review.typo3.org/23560
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
History
#1 Updated by Gerrit Code Review over 2 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
#2 Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290
#3 Updated by Gerrit Code Review over 2 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290
#4 Updated by Gerrit Code Review over 2 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290
#5 Updated by Gerrit Code Review about 2 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290
#6 Updated by Gerrit Code Review about 2 years ago
Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290
#7 Updated by Gerrit Code Review about 2 years ago
Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290
#8 Updated by Gerrit Code Review almost 2 years ago
Patch set 8 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290
#9 Updated by Gerrit Code Review almost 2 years ago
Patch set 9 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18290
#10 Updated by Stefan Neufeind almost 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c111ddecca0f903a98a57b3d3bd1bbca2c999826.
#11 Updated by Gerrit Code Review almost 2 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
#12 Updated by Gerrit Code Review almost 2 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
#13 Updated by Gerrit Code Review almost 2 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
#14 Updated by Gerrit Code Review almost 2 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
#15 Updated by Gerrit Code Review almost 2 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
#16 Updated by Gerrit Code Review almost 2 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
#17 Updated by Gerrit Code Review almost 2 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
#18 Updated by Gerrit Code Review almost 2 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
#19 Updated by Stefan Neufeind almost 2 years ago
- Status changed from Under Review to Resolved
Applied in changeset 046967d98785ce5a363158661f061b9ae505d248.
#20 Updated by aimcom no-lastname-given almost 2 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.
#21 Updated by Markus Klein almost 2 years ago
The findBestMatchingStorageByLocalPath() method simply does not check whether the file requested actually exists in the selected storage!
#22 Updated by Markus Klein almost 2 years ago
Moved to a separate issue: http://forge.typo3.org/issues/52173