It isn't possible to use a newly created local ResourceStorage
Same as Bug #62273 :
If you create a new ResourceStorage through the StorageRepository->createLocalStorage method and there is already other ResourceStorages registered, it isn't possible to get the ResourceStorage object from either the StorageRepository->FindByUid or ResourceFactory->getStorageObject method.
This is due to caches not being updated after the new ResourceStorage record have inserted into the database.
I guess the best solution would be to have a signal to indicate when the storage cache should be updated, probably both in StorageRepository and ResourceFactory.
[BUGFIX] Update local cache upon creation of new storage object
When a new storage object for the "local" driver is being created
it is not possible to retrieve the new object instantaneous. The
objects are being cached in a local static variable which needs
to get flushed (set to "null") first.
Signed-off-by: Yann Weyer <email@example.com>
Tested-by: TYPO3com <firstname.lastname@example.org>
Tested-by: Benni Mack <email@example.com>
Reviewed-by: Ghanshyam Bhava <firstname.lastname@example.org>
Reviewed-by: Benni Mack <email@example.com>
Reviewed-by: Henning Liebe <firstname.lastname@example.org>
#2 Updated by Gerrit Code Review 11 months 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/+/62474
#3 Updated by Gerrit Code Review 11 months 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/+/62475