#106173BUGFIX b1e36ce3dae (TYPO3 12.4.27) breaks entry point selection at Filemount
Description
After updating from TYPO3 12.4.26 to TYPO3 12.4.27 we got a TypeError
TYPO3\CMS\Core\Imaging\IconFactory::getIconForResource(): Argument #1 ($resource) must be of type TYPO3\CMS\Core\Resource\ResourceInterface, null given, called in /Application/vendor/typo3/cms-core/Classes/ViewHelpers/IconForResourceViewHelper.php on line 72
It looks like the bugfix b1e36ce3dae, which was released with TYPO3 12.4.27, breaks the selection of the entry point for the filemount entry.
See: https://github.com/typo3/typo3/commit/b1e36ce3dae
This removed code in “TYPO3\CMS\Filelist\ElementBrowser\AbstractResourceBrowser->initSelectedFolder()” causes the problem:
if (!$this->selectedFolder) {
$allStorages = $this->getBackendUser()->getFileStorages();
$defaultStorage = $resourceFactory->getDefaultStorage();
if ($defaultStorage && array_key_exists($defaultStorage->getUid(), $allStorages)) {
$this->selectedFolder = $defaultStorage->getRootLevelFolder();
} else {
$this->selectedFolder = reset($allStorages)->getRootLevelFolder();
}
}
Procedure for reproducing the issue:
- In Backend: Select the root page (ID 0) in list view
- Edit a filemount e.g. the default “fileadmin“
- Click on the ‘Search for folders’ button next to the ‘Entry point’ item.
Reviews 6
- 12.4 88226[BUGFIX] Harden IconForResourceViewHelper to prevent filemount errors
- 12.4 88582[BUGFIX] Avoid exception in folder browser if there is no selected folder
- 13.4 88581[BUGFIX] Avoid exception in folder browser if there is no selected folder
- main 88579[BUGFIX] Avoid exception in folder browser if there is no selected folder
- 13.4 88225[BUGFIX] Harden IconForResourceViewHelper to prevent filemount errors
- main 88209[BUGFIX] Harden IconForResourceViewHelper to prevent filemount errors
Related issues 6
- Bug #102611TYPO3\CMS\Core\Imaging\IconFactory::getIconForResource(): Argument #1 ($resource) must be of type TYPO3\CMS\Core\Resource\ResourceInterface, null given, called in /var/www/html/vendor/typo3/cms-core/Classes/ViewHelpers/IconForResourceViewHelper.php on lin
- Bug #103897Reproducable 503 when editor has no access to the default storage
- Bug #105152503 when editor has no access to the default storage #2
- Bug #106038Avoid exception in file element browser
- Bug #106194Updating the entry point of a filemount causes an error (missing expand attribute in user settings)
- Bug #106365Folder browser exception: icon can't be loaded for null